implemented helper class SocketListener; server listeners converted to use SocketListener