public object ReceiveMessage() { object message = NetworkUtilities.Receive(Client); if (message == null) { Stop(); } return(message); }
public object ReceiveMessage(ClientConnection client) { object dataReceived = NetworkUtilities.Receive(client); if (dataReceived == null) { throw new InvalidOperationException(); } return(dataReceived); }
public ServerConnection(int port) : base(NetworkUtilities.GetLocalIPAddress(), port) { IsLocalConnection = true; Listener = new TcpListener(IPAddress.Parse(SERVER_IP), PORT_NO); }
public void Send(object message) { NetworkUtilities.Send(message, Client); }
public new bool IsLocalConnection() { return(IPAddress == NetworkUtilities.GetLocalIPAddress()); }
public void SendMessageTo(object message, ClientConnection client) { NetworkUtilities.Send(message, client); }