added TCP chat server and tcp server lifecycle