C → S → C {type:'chat', from:…, to:…, format:…, msg:…}
chat - text message. Client wanting to send a text message sends chat message to server, server forwards it to requested client.
arguments:
optional argument:
S → C {type:'chat', from:…, error:…, msg:…}
If an error occurs server can send chat message containing error description to client: