moved consoler code into more generic socket-server module