Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateFromStream() [2/2]

static WebSocket System.Net.WebSockets.WebSocket.CreateFromStream ( Stream stream,
WebSocketCreationOptions options )
inlinestaticinherited

Definition at line 151 of file WebSocket.cs.

152 {
153 if (stream == null)
154 {
155 throw new ArgumentNullException("stream");
156 }
157 if (options == null)
158 {
159 throw new ArgumentNullException("options");
160 }
161 if (!stream.CanRead || !stream.CanWrite)
162 {
163 throw new ArgumentException((!stream.CanRead) ? System.SR.NotReadableStream : System.SR.NotWriteableStream, "stream");
164 }
165 return new ManagedWebSocket(stream, options);
166 }
static string NotReadableStream
Definition SR.cs:60
Definition SR.cs:7

References System.SR.NotReadableStream, System.SR.NotWriteableStream, System.options, and System.stream.