public Action AddSocket( ISocketHandle socket )
 {
     var id = socket.Id;
     Clients.AddOrUpdate( id, 
         x => new SocketClient() { Id = id, Next = ParseRequest, Socket = socket }, 
         ( x, y ) => new SocketClient() { Id = id, Next = ParseRequest, Socket = socket } );
     socket.Read();
     return () => HandleSocketClose( id );
 }
예제 #2
0
 public ResponseWriter( ISocketHandle client, ManualResetEventSlim pendingWrite, Action onComplete )
 {
     Client = client;
     CompletionCallback = onComplete;
     PendingWrite = pendingWrite;
 }