Re-implemented custom blocking connection to optionally share a listener
thread accross many connections.