Modified server protocol; made messaging framework

message_clients() is a new function which will write message to all
clients at once (not yet implemented)