Lines Matching refs:curl
32 static void websocket_close(CURL *curl) in websocket_close() argument
36 curl_ws_send(curl, "", 0, &sent, 0, CURLWS_CLOSE); in websocket_close()
41 static void websocket(CURL *curl) in websocket() argument
54 curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta); in websocket()
73 websocket_close(curl); in websocket()
78 CURL *curl; in test() local
83 curl = curl_easy_init(); in test()
84 if(curl) { in test()
85 curl_easy_setopt(curl, CURLOPT_URL, URL); in test()
88 curl_easy_setopt(curl, CURLOPT_USERAGENT, "websocket/2304"); in test()
91 curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &libtest_debug_config); in test()
92 curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); in test()
93 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); in test()
94 curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 2L); /* websocket style */ in test()
95 res = curl_easy_perform(curl); in test()
98 websocket(curl); in test()
101 curl_easy_cleanup(curl); in test()