chat

Adjust on the routine of sending struct through socket
chat

Finished the implementation of send message to the server
Chat

Implementation  commom functions