Example #1
0
 public void SendMessageToHost(GameMessage msg)
 {
     this.SendMessageToHost(msg, DefaultPort);
 }
Example #2
0
 public void SendMessageToOpponent(GameMessage msg)
 {
     this.SendMessageToOpponent(msg, DefaultPort);
 }
Example #3
0
 public void SendMessageToOpponent(GameMessage msg, int port)
 {
     if(this.opponentIP != string.Empty) {
         this.SendMessage(this.opponentIP, msg, port);
     }
 }
Example #4
0
 public void SendMessageToObservers(GameMessage msg)
 {
     foreach(string observer in this.ObserverIPs) {
         this.SendMessage(observer, msg, DefaultPort);
     }
 }
Example #5
0
 public void SendMessageToHost(GameMessage msg, int port)
 {
     if(this.hostIP != string.Empty) {
         this.SendMessage(this.hostIP, msg, port);
     }
 }
Example #6
0
 private void SendMessage(string host, GameMessage msg, int port)
 {
     string msgg = "dd";
     byte[] bytes = Encoding.UTF8.GetBytes(msgg);
     this.client.Send(bytes, bytes.Length, host, port);
 }