DevicePortalConnection.GetServerStreamWebSocketForRequest 方法

定义

重载

GetServerStreamWebSocketForRequest(HttpRequestMessage)

返回用于 Device Portal 的服务器端流 WebSocket。

GetServerStreamWebSocketForRequest(HttpRequestMessage, String, UInt32, Boolean)

返回用于 Device Portal 的服务器端流 WebSocket。

GetServerStreamWebSocketForRequest(HttpRequestMessage)

返回用于 Device Portal 的服务器端流 WebSocket。

public:
 virtual ServerStreamWebSocket ^ GetServerStreamWebSocketForRequest(HttpRequestMessage ^ request) = GetServerStreamWebSocketForRequest;
/// [Windows.Foundation.Metadata.Overload("GetServerStreamWebSocketForRequest")]
ServerStreamWebSocket GetServerStreamWebSocketForRequest(HttpRequestMessage const& request);
[Windows.Foundation.Metadata.Overload("GetServerStreamWebSocketForRequest")]
public ServerStreamWebSocket GetServerStreamWebSocketForRequest(HttpRequestMessage request);
function getServerStreamWebSocketForRequest(request)
Public Function GetServerStreamWebSocketForRequest (request As HttpRequestMessage) As ServerStreamWebSocket

参数

request
HttpRequestMessage

HTTP 请求消息 (作为 DevicePortalConnectionRequestReceivedEventArgs 类) 的属性找到。

返回

可与设备门户一起使用的服务器端流 WebSocket 对象。

属性

Windows 要求

设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v6.0 中引入)

适用于

GetServerStreamWebSocketForRequest(HttpRequestMessage, String, UInt32, Boolean)

返回用于 Device Portal 的服务器端流 WebSocket。

public:
 virtual ServerStreamWebSocket ^ GetServerStreamWebSocketForRequest(HttpRequestMessage ^ request, Platform::String ^ protocol, unsigned int outboundBufferSizeInBytes, bool noDelay) = GetServerStreamWebSocketForRequest;
/// [Windows.Foundation.Metadata.Overload("GetServerStreamWebSocketForRequest2")]
ServerStreamWebSocket GetServerStreamWebSocketForRequest(HttpRequestMessage const& request, winrt::hstring const& protocol, uint32_t const& outboundBufferSizeInBytes, bool const& noDelay);
[Windows.Foundation.Metadata.Overload("GetServerStreamWebSocketForRequest2")]
public ServerStreamWebSocket GetServerStreamWebSocketForRequest(HttpRequestMessage request, string protocol, uint outboundBufferSizeInBytes, bool noDelay);
function getServerStreamWebSocketForRequest(request, protocol, outboundBufferSizeInBytes, noDelay)
Public Function GetServerStreamWebSocketForRequest (request As HttpRequestMessage, protocol As String, outboundBufferSizeInBytes As UInteger, noDelay As Boolean) As ServerStreamWebSocket

参数

request
HttpRequestMessage

HTTP 请求消息 (作为 DevicePortalConnectionRequestReceivedEventArgs 类) 的属性找到。

protocol
String

Platform::String

winrt::hstring

此 WebSocket 将使用的子协议。

outboundBufferSizeInBytes
UInt32

unsigned int

uint32_t

要用于在 ServerMessageWebSocket 对象上发送数据的发送缓冲区的大小(以字节为单位)。

noDelay
Boolean

bool

一个布尔值,指示是否在此 WebSocket 对象上使用 Nagle 算法。 有关 Nagle 算法的详细信息,请参阅 StreamSocketControl 类。

返回

可与设备门户一起使用的服务器端流 WebSocket 对象。

属性

Windows 要求

设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v6.0 中引入)

适用于