ServerStreamWebSocket Class
Definition
Supports network communication that allows reading and writing streams using a WebSocket object owned by a web server. You can't register for an arbitrary WebSocket connection; instead, an instance of ServerStreamWebSocket is created by system code such as the Windows Device Portal (WDP).
public ref class ServerStreamWebSocket sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ServerStreamWebSocket final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ServerStreamWebSocket : System.IDisposable
Public NotInheritable Class ServerStreamWebSocket
Implements IDisposable
- Inheritance
-
ServerStreamWebSocket
- Attributes
- Implements
Windows 10 requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v6.0)
|
App capabilities |
internetClientServer
privateNetworkClientServer
|
Properties
Information |
Gets socket information on a ServerStreamWebSocket object. |
InputStream |
Gets the input stream to read from the remote destination on a ServerStreamWebSocket object. |
OutputStream |
Gets the output stream to write to the remote network destination on a ServerStreamWebSocket object. |
Methods
Close() |
Closes the ServerStreamWebSocket and sends an empty close frame to the server. |
Close(UInt16, String) |
Closes the ServerStreamWebSocket object and indicates a reason for the closure. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Events
Closed |
Occurs when a close frame is received on the ServerStreamWebSocket object as part of the close handshake. |