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 ); }
public ResponseWriter( ISocketHandle client, ManualResetEventSlim pendingWrite, Action onComplete ) { Client = client; CompletionCallback = onComplete; PendingWrite = pendingWrite; }