WebSocketHelpers Class¶
- Namespace
Microsoft.Net.WebSockets
- Assemblies
- Microsoft.Net.WebSockets.Server
Methods¶
-
CreateServerWebSocket
(System.IO.Stream, System.String, System.Int32, System.TimeSpan, System.ArraySegment<System.Byte>)¶ Return type: System.Net.WebSockets.WebSocket public static WebSocket CreateServerWebSocket(Stream opaqueStream, string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment<byte> internalBuffer)
-
GetSecWebSocketAcceptString
(System.String)¶ Return type: System.String [SuppressMessage("Microsoft.Cryptographic.Standard", "CA5354:SHA1CannotBeUsed", Justification = "SHA1 used only for hashing purposes, not for crypto.")] public static string GetSecWebSocketAcceptString(string secWebSocketKey)
-
IsValidWebSocketKey
(System.String)¶ Return type: System.Boolean public static bool IsValidWebSocketKey(string key)
-
ProcessWebSocketProtocolHeader
(System.Collections.Generic.IEnumerable<System.String>, System.String)¶ Return type: System.Boolean public static bool ProcessWebSocketProtocolHeader(IEnumerable<string> clientSecWebSocketProtocols, string subProtocol)
-
ValidateArraySegment<T>
(System.ArraySegment<T>, System.String)¶ public static void ValidateArraySegment<T>(ArraySegment<T> arraySegment, string parameterName)
-
ValidateOptions
(System.String, System.Int32, System.Int32, System.TimeSpan)¶ public static void ValidateOptions(string subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval)
-