WinHttpWebSocketSend function
The WinHttpWebSocketSend function sends data over a WebSocket connection.
Syntax
DWORD WINAPI WinHttpWebSocketSend( _In_ HINTERNET hWebSocket, _In_ WINHTTP_WEB_SOCKET_BUFFER_TYPE eBufferType, _In_ PVOID pvBuffer, _In_ DWORD dwBufferLength );
Parameters
- hWebSocket [in]
-
Type: HINTERNET
Handle to a websocket.
- eBufferType [in]
-
Type: WINHTTP_WEB_SOCKET_BUFFER_TYPE
Type of buffer.
Note Do not specify WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE. Use WinHttpWebSocketClose or WinHttpWebSocketShutdown to close the connection. - pvBuffer [in]
-
Type: PVOID
Pointer to a buffer containing the data to send. Can be NULL only if dwBufferLength is 0.
- dwBufferLength [in]
-
Type: DWORD
Length of pvBuffer.
Return value
Type: DWORD
NO_ERROR on success. Otherwise an error code.
| Description | |
|---|---|
|
A close or send is pending, or the send channel has already been closed. |
|
A parameter is invalid. |
Requirements
|
Minimum supported client |
Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also