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