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