示例#1
0
 public void SendMessageToHost(GameMessage msg)
 {
     this.SendMessageToHost(msg, DefaultPort);
 }
示例#2
0
 public void SendMessageToOpponent(GameMessage msg)
 {
     this.SendMessageToOpponent(msg, DefaultPort);
 }
示例#3
0
 public void SendMessageToOpponent(GameMessage msg, int port)
 {
     if(this.opponentIP != string.Empty) {
         this.SendMessage(this.opponentIP, msg, port);
     }
 }
示例#4
0
 public void SendMessageToObservers(GameMessage msg)
 {
     foreach(string observer in this.ObserverIPs) {
         this.SendMessage(observer, msg, DefaultPort);
     }
 }
示例#5
0
 public void SendMessageToHost(GameMessage msg, int port)
 {
     if(this.hostIP != string.Empty) {
         this.SendMessage(this.hostIP, msg, port);
     }
 }
示例#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);
 }