> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HCGetWebSocketFunctions

> HCGetWebSocketFunctions

# HCGetWebSocketFunctions

取得實作 WebSocket 函式的函式。

## 語法

```cpp theme={null}
HRESULT HCGetWebSocketFunctions(  
         HCWebSocketConnectFunction* websocketConnectFunc,  
         HCWebSocketSendMessageFunction* websocketSendMessageFunc,  
         HCWebSocketSendBinaryMessageFunction* websocketSendBinaryMessageFunc,  
         HCWebSocketDisconnectFunction* websocketDisconnectFunc,  
         void** context  
)  
```

### 參數

*websocketConnectFunc*   \_Out\_\
類型：HCWebSocketConnectFunction\*

依需求實作 WebSocket 連線函式的回呼。

*websocketSendMessageFunc*   \_Out\_\
類型：HCWebSocketSendMessageFunction\*

依需求實作 WebSocket 傳送訊息函式的回呼。

*websocketSendBinaryMessageFunc*   \_Out\_\
類型：HCWebSocketSendBinaryMessageFunction\*

依需求實作 WebSocket 傳送二進位訊息函式的回呼。

*websocketDisconnectFunc*   \_Out\_\
類型：HCWebSocketDisconnectFunction\*

依需求實作 WebSocket 中斷連線函式的回呼。

*context*   \_Out\_\
類型：void\*\*

回呼的內容指標。

### 傳回值

類型：HRESULT

此 API 作業的結果代碼。可能的值為 S\_OK 或 E\_FAIL。

## 需求

**標頭：** httpProvider.h

**程式庫：** libHttpClient.GDK.lib

## 另請參閱

[httpProvider](/zh-TW/reference/live/httpclient/httpprovider/httpprovider_members)


## Related topics

- [HCWebSocketGetEventFunctions](/zh-TW/reference/live/httpclient/httpclient/functions/hcwebsocketgeteventfunctions.md)
- [HCWebSocketGetHeader](/zh-TW/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheader.md)
- [HCWebSocketGetHeaderAtIndex](/zh-TW/reference/live/httpclient/httpprovider/functions/hcwebsocketgetheaderatindex.md)
- [HCWebSocketGetNumHeaders](/zh-TW/reference/live/httpclient/httpprovider/functions/hcwebsocketgetnumheaders.md)
- [HCWebSocketGetProxyUri](/zh-TW/reference/live/httpclient/httpprovider/functions/hcwebsocketgetproxyuri.md)
