added method to compute gap to TWLSocket so all sockets use same method