move the socket server in its own file to make unit test easier.
configurable server poll timeout
finalizing the join use case.