public WebSocketHttpListenerDuplexStream(HttpRequestStream inputStream,
HttpResponseStream outputStream,
HttpListenerContext context)
{
Debug.Assert(inputStream != null, "'inputStream' MUST NOT be NULL.");
Debug.Assert(outputStream != null, "'outputStream' MUST NOT be NULL.");
Debug.Assert(context != null, "'context' MUST NOT be NULL.");
Debug.Assert(inputStream.CanRead, "'inputStream' MUST support read operations.");
Debug.Assert(outputStream.CanWrite, "'outputStream' MUST support write operations.");
_inputStream = inputStream;
_outputStream = outputStream;
_context = context;
if (NetEventSource.IsEnabled)
{
NetEventSource.Associate(inputStream, this);
NetEventSource.Associate(outputStream, this);
}
}