protected override void ReceiveCore(ServerRequestContext context) { this.OnReceiving(); try { InProcPacket.ProcessReceive(this._inboundQueue, this._pendingPackets, context, this._receivingCancellationTokenSource.Token); } catch (OperationCanceledException) { context.SocketError = SocketError.OperationAborted; } this.OnReceived(context); this.OnReceived(); }
protected sealed override void ReceiveCore(ClientResponseContext context) { Task.Factory.StartNew( () => { try { InProcPacket.ProcessReceive(this._inboundQueue, this._pendingPackets, context, this._linkedCancellationTokenSource.Token); } catch (OperationCanceledException) { return; } this.OnReceived(context); } ); }