예제 #1
0
            public ClientListener(Connection mainConnection, CancellationToken cToken)
            {
                isStart           = new RecordOnce <bool>();
                clientHandlersMap = new ConcurrentDictionary <Guid, ConcurrentDictionary <short, Action> >();

                this.mainConnection = mainConnection;
                this.cToken         = cToken;
            }
예제 #2
0
        protected ConnectingHandler(Connection connection, ConnectedClient connectedClient)
        {
            ID       = Guid.NewGuid();
            comObj   = new CommunicationObject(connection);
            ctSource = new CancellationTokenSource();
            cleanup  = new RecordOnce <bool>();

            this.connection      = connection;
            this.connectedClient = connectedClient;
        }
예제 #3
0
 private Connection()
 {
     connectionGuard = new ConnectionGuard(this);
     initialized     = new RecordOnce <bool>();
 }