Example #1
0
 public static void ClientDisconnect(OnMsgArrived onMsgArrived)
 {
     //DChatServer.onMsgArrived = (OnMsgArrived)
     //Delegate.Remove(DChatServer.onMsgArrived, onMsgArrived);
     DChatServer.onMsgArrived -= onMsgArrived;
 }
Example #2
0
 // The following method is used to provide clients a public method to add delegates to the onMsgArrived's invocation list
 public static void ClientConnect(OnMsgArrived onMsgArrived)
 {
     // the following shorthand in C# is equivalent to:
     //   DChatServer.onMsgArrived = (OnMsgArrived)Delegate.Combine(DChatServer.onMsgArrived, onMsgArrived);
     DChatServer.onMsgArrived += onMsgArrived;
 }