/// <param name="client">Клиентское подключение</param> /// <param name="opitions">Настройки подключения</param> public ServerConnection(TcpClient client, ConnectionOpitions opitions) : base(opitions) { if ((connection = client) == null) { throw new ArgumentNullException(nameof(client)); } OnConnect(); Send(opitions); }
protected Connection(ConnectionOpitions opitions) { if ((Opitions = opitions) == null) { throw new ArgumentNullException(nameof(opitions)); } if (!Opitions.EventOriented) { receivedObjects = new Queue <object>(); } }
void ConnectionOpitionsReceived(Connection sender, ConnectionOpitions opitions) { Opitions.SetDisconnectAvait(opitions.MaxDisconnectAvait, opitions.AverageDisconnectAvait); }