Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​WebSockets.​WebSocketCreationOptions
Assembly: System.Net.WebSockets
Inheritance: object → WebSocketCreationOptions
Options that control how a <see cref="T:System.Net.WebSockets.WebSocket" /> is created.
Properties
public
bool
IsServer
Defines if this websocket is the server-side of the connection. The default value is <see langword="false" /> .
public
string
SubProtocol
The agreed upon sub-protocol that was used when creating the connection.
public
TimeSpan
KeepAliveInterval
The keep-alive interval to use, or <see cref="F:System.TimeSpan.Zero" /> or <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to disable keep-alives.
The default is <see cref="F:System.TimeSpan.Zero" /> .
public
TimeSpan
KeepAliveTimeout
<para>The timeout to use when waiting for the peer's PONG in response to us sending a PING; or <see cref="F:System.TimeSpan.Zero" /> or <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" /> to disable waiting for peer's response, and use an unsolicited PONG as a Keep-Alive heartbeat instead.</para> <para>The default is <see cref="F:System.Threading.Timeout.InfiniteTimeSpan" />.</para>
public
WebSocketDeflateOptions
DangerousDeflateOptions
The agreed upon options for per message deflate. <para /> Be aware that enabling compression makes the application subject to CRIME/BREACH type of attacks.
It is strongly advised to turn off compression when sending data containing secrets by specifying <see cref="F:System.Net.WebSockets.WebSocketMessageFlags.DisableCompression" /> flag for such messages.
Methods
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object