Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WebSocketReceive function adds a receive operation to the protocol component operation queue.
HRESULT WebSocketReceive(
[in] WEB_SOCKET_HANDLE hWebSocket,
[in, optional] WEB_SOCKET_BUFFER *pBuffer,
[in, optional] PVOID pvContext
);
[in] hWebSocket
Type: WEB_SOCKET_HANDLE
WebSocket session handle returned by a previous call to WebSocketCreateClientHandle or WebSocketCreateServerHandle.
[in, optional] pBuffer
Type: WEB_SOCKET_BUFFER*
A pointer to an array of WEB_SOCKET_BUFFER structures that WebSocket data will be written to when it is returned by WebSocketGetAction. If NULL, WebSocketGetAction will return an internal buffer that enables zero-copy scenarios.
[in, optional] pvContext
Type: PVOID
A pointer to an application context handle that will be returned by a subsequent call to WebSocketGetAction.
Type: HRESULT
If the function succeeds, it returns S_OK.
If the function fails, it returns one of the following or a system error code defined in WinError.h.
Return code | Description |
---|---|
|
Protocol performed an invalid operation. |
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | websocket.h |
Library | Websocket.lib |
DLL | Websocket.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today