Exemple #1
0
 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;
 }
Exemple #2
0
 public static bool sendmessage(Message m, ref byte[] data)
 {
     return sendmessage(m.Type, m.Content, ref data);
 }
Exemple #3
0
 public static byte[] sendmessage(Message m)
 {
     return sendmessage(m.Type, m.Content);
 }
Exemple #4
0
 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]);
 }