Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
 protected Connection(ConnectionOpitions opitions)
 {
     if ((Opitions = opitions) == null)
     {
         throw new ArgumentNullException(nameof(opitions));
     }
     if (!Opitions.EventOriented)
     {
         receivedObjects = new Queue <object>();
     }
 }
Beispiel #3
0
 void ConnectionOpitionsReceived(Connection sender, ConnectionOpitions opitions)
 {
     Opitions.SetDisconnectAvait(opitions.MaxDisconnectAvait, opitions.AverageDisconnectAvait);
 }