Connect Method
Connects to the specified host.
Syntax
ANSI (Cross Platform) int Connect(const char* lpszURL); Unicode (Windows) INT Connect(LPCWSTR lpszURL);
- (void)connect:(NSString*)URL;
#define MID_WEBSOCKETCLIENT_CONNECT 4 IPWORKSWS_EXTERNAL int IPWORKSWS_CALL IPWorksWS_WebSocketClient_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
The Connect method will establish a WebSocket connection to the host and port specified in the URL parameter. The URL must be specified in the format "ws://host:[port]/[URI]" for plain-text connections or "wss://host:[port]/[URI]" for SSL enabled connections.
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)