Enhance TCP client and server: add connection handling, message sending/receiving, chat creation, and user invitation features