示例#1
0
        private void ConnectionAccepted(ConnectClient client)
        {
            if (ActiveClientCount > MaxActiveClientCount)
            {
                client.Dispose();
                return;
            }
            Interlocked.Increment(ref _ActiveClientCount);
            ActiveClientCount++;
            var thread = new Thread(() => DoClient(client));

            thread.IsBackground = true;
            thread.Start();
        }
示例#2
0
 public void Dispose()
 {
     Client.Dispose();
 }
示例#3
0
 public void Dispose()
 {
     IsActive = false;
     Client.Dispose();
 }