1

This is the signature of libwebsocket_client_connect()

struct libwebsocket * libwebsocket_client_connect(
struct libwebsocket_context * context, 
const char * address, int port, int ssl_connection, const char *path, 
const char * host, const char * origin, 
const char * protocol, int ietf_version_or_minus_one)

here could anyone explain what does path parameter means?

In doc its written as path - websocket path on server. But i couldnt its proper meaning.

tijko
  • 7,599
  • 11
  • 44
  • 64
RAVI
  • 11
  • 2

1 Answers1

1

path refers to the path where the websockets endpoint/uri is located on the server.

When you run the sample code for websocket server available online, the server generally runs at localhost:9000 .Here is there is no path and you can give "/" as path in libwebsocket_client_connect().

But in some cases the server may be running at a specified uri on the server like www.myserver:9000/inside/inside/websockets/endpoint

In above case the path is "/inside/inside/websockets/endpoint"

tijko
  • 7,599
  • 11
  • 44
  • 64
kid
  • 140
  • 1
  • 10