protected override bool HandleSendCommand(SendCommand Command) { ServerSendCommand sendCommand = (ServerSendCommand)Command; TCPClient client = (TCPClient)sendCommand.Client; //if (!client.IsReady) // return false; client.Statistics.AddBandwidthOut(Command.Buffer.Size); client.Statistics.SetLastTouchTime(Time.CurrentEpochTime); if (!SendOverSocket(client.Socket, Command.Buffer)) { HandleClientDisconnection(client); lock (clients) { clients.Remove(client); } return(false); } return(true); }
protected override bool HandleSendCommand(SendCommand Command) { ServerSendCommand sendCommand = (ServerSendCommand)Command; UDPClient client = (UDPClient)sendCommand.Client; if (!client.IsReady) { return(false); } client.Statistics.AddBandwidthOut(Command.Buffer.Size); SendOverSocket(client.EndPoint, Command.Buffer); return(true); }