public static Message NewMessage() { Message m = new Message(); m.Tag = string.Empty; m.Type = MessageTypes.UNKNOWN_MESSAGE; m.Content = string.Empty; m.ByteLength = 0; return m; }
public static bool sendmessage(Message m, ref byte[] data) { return sendmessage(m.Type, m.Content, ref data); }
public static byte[] sendmessage(Message m) { return sendmessage(m.Type, m.Content); }
long handle(Message m) { if (m.Tag == string.Empty) return 0; int cid = client.IndexOf(m.Tag); return handle(m.Type, m.Content, cid==-1 ? null : _sock[cid]); }