Need to send an event message using sockets ie on NSoutputstream where each event message consists of three parts:
Message length - 0-255 Length of packet (including event number, excluding message length)
Event number - 0-255 Event byte number defining action
Content - /[0-255]+/ Content of message
Every event is utf-8 encoded string separated by pipe delimiter character “|”
The packet length and event number should be of one byte each.
event id for loginCab: 2, // login | password.
The output of this should be
Accept request : 05
Reject Request: 04
The code is available here:
[url removed, login to view]