// Initiate a websocket context with an already connected socket,
// enable TLS, but don't use a certificate or key for the client.
websock_conn* ws=websock_new(connectedsocket, TRUE, NULL, NULL);
// Perform a websocket handshake with a path, hostname, list of
// supported protocols, origin, but no custom cookies.
if(!websock_handshake_client(ws, "/path", "example.com",
"protocol1,protocol2", "https://origin.example.com", NULL))
{
printf("Websocket handshake failed\n"); return -1;
}