public ClientServer(SendMappings sendMappings, string name, NetConnection connection) { Name = name ?? throw new ArgumentNullException(nameof(name)); Connection = connection ?? throw new ArgumentNullException(nameof(connection)); _pendingMessages = new PendingMessages(sendMappings ?? throw new ArgumentNullException(nameof(sendMappings))); }
private ServerClient( SendMappings sendMappings, NetConnection connection, ITime engineTime, NetworkObjectListTransmitter objectListTransmitter, int index, int userId, string name) { _sendMappings = sendMappings ?? throw new ArgumentNullException(nameof(sendMappings)); Connection = connection ?? throw new ArgumentNullException(nameof(connection)); _engineTime = engineTime ?? throw new ArgumentNullException(nameof(engineTime)); if (objectListTransmitter == null) { throw new ArgumentNullException(nameof(objectListTransmitter)); } FrameListTransmitter = objectListTransmitter.CreateTransmitter(this); Index = index; UserId = userId; Name = name ?? throw new ArgumentNullException(nameof(name)); _reliableMessages = new PendingMessages(_sendMappings); _unreliableMessages = new PendingMessages(_sendMappings); }
public static ServerClient CreateClient( SendMappings sendMappings, NetConnection connection, ITime engineTime, NetworkObjectListTransmitter objectListTransmitter, int index, int userId, string name) { return(new ServerClient(sendMappings, connection, engineTime, objectListTransmitter, index, userId, name)); }