public void SendData(MessageObject message) { if (message != null) { clientSocket.Send(message.BinarySerialization()); } }
public void SendData(MessageObject message, Socket client) { sendingThread = new Thread(() => { client.Send(message.BinarySerialization()); }); sendingThread.Start(); Console.WriteLine("Data Sent to " + client.RemoteEndPoint); }