44 foreach (
string b in array)
93 if (
string.IsNullOrEmpty(
text))
102 bool flag =
string.IsNullOrWhiteSpace(
text2);
136 string origin =
request.Headers[
"Origin"];
148 response.StatusCode = 101;
164 await response.OutputStream.FlushAsync().SuppressContextFlow();
171 HttpListenerWebSocketContext httpListenerWebSocketContext =
new HttpListenerWebSocketContext(
request.Url,
request.Headers,
request.Cookies, context.
User,
request.IsAuthenticated,
request.IsLocal,
request.IsSecureConnection, origin,
secWebSocketProtocols.AsReadOnly(),
secWebSocketVersion,
secWebSocketKey,
webSocket);
201 return response.SendHeaders(
null,
null, global::Interop.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA | global::Interop.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA | global::Interop.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_OPAQUE,
isWebSocketHandshake:
true);
void Add(TKey key, TValue value)
static string ToBase64String(byte[] inArray)
static unsafe byte[] FromBase64String(string s)
HttpListenerResponse Response
HttpListenerRequest Request
NameValueCollection Headers
void SwitchToOpaqueMode()
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static void Associate(object first, object second, [CallerMemberName] string memberName=null)
static void ValidateOptions(string subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval)
static string GetSecWebSocketAcceptString(string secWebSocketKey)
static ConfiguredTaskAwaitable< T > SuppressContextFlow< T >(this Task< T > task)
static Task< HttpListenerWebSocketContext > AcceptWebSocketAsync(HttpListenerContext context, string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment< byte > internalBuffer)
static string SupportedVersion
static bool WebSocketsSupported
static void ThrowPlatformNotSupportedException_WSPC()
static ConfiguredTaskAwaitable SuppressContextFlow(this Task task)
static bool ProcessWebSocketProtocolHeader(string clientSecWebSocketProtocol, string subProtocol, out string acceptProtocol)
static void ValidateWebSocketHeaders(HttpListenerContext context)
static unsafe ulong SendWebSocketHeaders(HttpListenerResponse response)
static void ValidateInnerStream(Stream innerStream)
static async Task< HttpListenerWebSocketContext > AcceptWebSocketAsyncCore(HttpListenerContext context, string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment< byte > internalBuffer)
static void ThrowIfConnectionAborted(Stream connection, bool read)
static WebSocket Create(Stream innerStream, string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment< byte > internalBuffer)
static void Validate(int count, int receiveBufferSize, int sendBufferSize, bool isServerBuffer)
static string SupportedVersion
static void ValidateSubprotocol(string subProtocol)
static void ValidateArraySegment(ArraySegment< byte > arraySegment, string parameterName)
static string net_WebSockets_AcceptUnsupportedProtocol
static string net_WebSockets_NativeSendResponseHeaders
static string net_readonlystream
static string net_WebSockets_AcceptHeaderNotFound
static string Format(string resourceFormat, object p1)
static string net_WebSockets_AcceptUnsupportedWebSocketVersion
static string net_WebSockets_ClientAcceptingNoProtocols
static string net_WebSockets_AcceptNotAWebSocket
static string net_writeonlystream
static string net_WebSockets_UnsupportedPlatform
static string net_WebSockets_ArgumentOutOfRange_TooSmall
static string net_WebSockets_ArgumentOutOfRange_TooBig
static byte[] HashData(byte[] source)
static readonly TimeSpan InfiniteTimeSpan