private SendIdMessages GetSendIdMessage(ClientHandler clientHandler) { IPEndPoint serverIp = (IPEndPoint)tcpSocket.LocalEndPoint; return(new SendIdMessages(DateTime.Now, serverIp.Address, serverIp.Port, clientHandler.id)); }
public void SendMessageToClient(Messages message, ClientHandler clientHandler) { clientHandler.tcpSocket.Send(messageSerializer.Serialize(message)); }