DevicePortalConnection.GetServerMessageWebSocketForRequest 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetServerMessageWebSocketForRequest(HttpRequestMessage) |
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。 |
GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String) |
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。 |
GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String, UInt32, UInt32, MessageWebSocketReceiveMode) |
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。 |
GetServerMessageWebSocketForRequest(HttpRequestMessage)
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。
public:
virtual ServerMessageWebSocket ^ GetServerMessageWebSocketForRequest(HttpRequestMessage ^ request) = GetServerMessageWebSocketForRequest;
/// [Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest")]
ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage const& request);
[Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest")]
public ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage request);
function getServerMessageWebSocketForRequest(request)
Public Function GetServerMessageWebSocketForRequest (request As HttpRequestMessage) As ServerMessageWebSocket
參數
- request
- HttpRequestMessage
HTTP 要求訊息 (找到為 DevicePortalConnectionRequestReceivedEventArgs 類別) 的屬性。
傳回
可與 Device Portal 搭配使用的伺服器端訊息 WebSocket 物件。
- 屬性
Windows 需求
裝置系列 |
Windows 10, version 1803 (已於 10.0.17134.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)
|
適用於
GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String)
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。
public:
virtual ServerMessageWebSocket ^ GetServerMessageWebSocketForRequest(HttpRequestMessage ^ request, SocketMessageType messageType, Platform::String ^ protocol) = GetServerMessageWebSocketForRequest;
/// [Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest2")]
ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage const& request, SocketMessageType const& messageType, winrt::hstring const& protocol);
[Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest2")]
public ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage request, SocketMessageType messageType, string protocol);
function getServerMessageWebSocketForRequest(request, messageType, protocol)
Public Function GetServerMessageWebSocketForRequest (request As HttpRequestMessage, messageType As SocketMessageType, protocol As String) As ServerMessageWebSocket
參數
- request
- HttpRequestMessage
HTTP 要求訊息 (找到為 DevicePortalConnectionRequestReceivedEventArgs 類別) 的屬性。
- messageType
- SocketMessageType
SocketMessageType值,指出這個 WebSocket 將使用的傳訊類型。
- protocol
-
String
Platform::String
winrt::hstring
此 WebSocket 將使用的子通訊協定。
傳回
可與 Device Portal 搭配使用的伺服器端訊息 WebSocket 物件。
- 屬性
Windows 需求
裝置系列 |
Windows 10, version 1803 (已於 10.0.17134.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)
|
適用於
GetServerMessageWebSocketForRequest(HttpRequestMessage, SocketMessageType, String, UInt32, UInt32, MessageWebSocketReceiveMode)
傳回伺服器端訊息 WebSocket 以搭配 Device Portal 使用。
public:
virtual ServerMessageWebSocket ^ GetServerMessageWebSocketForRequest(HttpRequestMessage ^ request, SocketMessageType messageType, Platform::String ^ protocol, unsigned int outboundBufferSizeInBytes, unsigned int maxMessageSize, MessageWebSocketReceiveMode receiveMode) = GetServerMessageWebSocketForRequest;
/// [Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest3")]
ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage const& request, SocketMessageType const& messageType, winrt::hstring const& protocol, uint32_t const& outboundBufferSizeInBytes, uint32_t const& maxMessageSize, MessageWebSocketReceiveMode const& receiveMode);
[Windows.Foundation.Metadata.Overload("GetServerMessageWebSocketForRequest3")]
public ServerMessageWebSocket GetServerMessageWebSocketForRequest(HttpRequestMessage request, SocketMessageType messageType, string protocol, uint outboundBufferSizeInBytes, uint maxMessageSize, MessageWebSocketReceiveMode receiveMode);
function getServerMessageWebSocketForRequest(request, messageType, protocol, outboundBufferSizeInBytes, maxMessageSize, receiveMode)
Public Function GetServerMessageWebSocketForRequest (request As HttpRequestMessage, messageType As SocketMessageType, protocol As String, outboundBufferSizeInBytes As UInteger, maxMessageSize As UInteger, receiveMode As MessageWebSocketReceiveMode) As ServerMessageWebSocket
參數
- request
- HttpRequestMessage
HTTP 要求訊息 (找到為 DevicePortalConnectionRequestReceivedEventArgs 類別) 的屬性。
- messageType
- SocketMessageType
SocketMessageType值,指出這個 WebSocket 將使用的傳訊類型。
- protocol
-
String
Platform::String
winrt::hstring
此 WebSocket 將使用的子通訊協定。
- outboundBufferSizeInBytes
-
UInt32
unsigned int
uint32_t
要用於在 ServerMessageWebSocket 物件上傳送資料的傳送緩衝區大小,以位元組為單位。
- maxMessageSize
-
UInt32
unsigned int
uint32_t
ServerMessageWebSocket物件上要設定之 WebSocket 訊息的最大訊息大小,以位元組為單位。
- receiveMode
- MessageWebSocketReceiveMode
MessageWebSocketReceiveMode值,指出此 WebSocket 是否會收到完整或部分訊息。
傳回
可與 Device Portal 搭配使用的伺服器端訊息 WebSocket 物件。
- 屬性
Windows 需求
裝置系列 |
Windows 10, version 1803 (已於 10.0.17134.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)
|