示例#1
0
        public Connection(int id, Socket client, IProtocol protocol, ILogger logger)
        {
            // Initialize members
            Id       = id;
            Client   = client;
            Protocol = protocol;
            Logger   = logger;

            Logger.ForContext("ConnectionId", id);

            Connected    = true;
            LastActivity = DateTime.Now;

            BeginReceive();

            Protocol.Begin(this);
        }
示例#2
0
        public Connection(int id, Socket client, IProtocol protocol, ILogger logger)
        {
            // Initialize members
            Id = id;
            Client = client;
            Protocol = protocol;
            Logger = logger;

            Logger.ForContext("ConnectionId", id);

            Connected = true;
            LastActivity = DateTime.Now;

            BeginReceive();

            Protocol.Begin(this);
        }