initial commit of chat server event loop