Share via


DevicePortalConnection Class

Definition

Handles a connection to the Windows Device Portal.

public ref class DevicePortalConnection sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DevicePortalConnection final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DevicePortalConnection
Public NotInheritable Class DevicePortalConnection
Inheritance
Object Platform::Object IInspectable DevicePortalConnection
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

Version history

Windows version SDK version Value added
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage)
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage,SocketMessageType,String)
1803 17134 GetServerMessageWebSocketForRequest(HttpRequestMessage,SocketMessageType,String,UInt32,UInt32,MessageWebSocketReceiveMode)
1803 17134 GetServerStreamWebSocketForRequest(HttpRequestMessage)
1803 17134 GetServerStreamWebSocketForRequest(HttpRequestMessage,String,UInt32,Boolean)

Methods

GetForAppServiceConnection(AppServiceConnection)

Initializes an instance of DevicePortalConnection by using the app service connection passed in.

GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String, UInt32, UInt32, MessageWebSocketReceiveMode)

Returns a server-side message WebSocket for use with Device Portal.

GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String)

Returns a server-side message WebSocket for use with Device Portal.

GetServerMessageWebSocketForRequest(HttpRequestMessage)

Returns a server-side message WebSocket for use with Device Portal.

GetServerStreamWebSocketForRequest(HttpRequestMessage, String, UInt32, Boolean)

Returns a server-side stream WebSocket for use with Device Portal.

GetServerStreamWebSocketForRequest(HttpRequestMessage)

Returns a server-side stream WebSocket for use with Device Portal.

Events

Closed

Raised when the connection to the Windows Device Portal is closed. A device portal plugin app must implement a handler for this event.

RequestReceived

Raised when a request has been received through the Windows Device Portal server. A device portal plugin app must implement a handler for this event.

Applies to