Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1731526188, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "6328231f2aa628632344d96a58e25c3b194af506", "alias": [ "refs/heads/main"]},"tree": [ { "name": "CMakeLists.txt","mode": "33188", "size":729}, { "name": "README.md","mode": "33188", "size":1548}, { "name": "libwebsockets.org.cer","mode": "33188", "size":1940}, { "name": "minimal-ws-client.c","mode": "33188", "size":5438}],"s":{"c":1731526188,"u": 415}} ,{"schema":"libjg2-1", "cid":"7aa85eb8486c1b653255be3f89176f76", "oid":{ "oid": "6328231f2aa628632344d96a58e25c3b194af506", "alias": [ "refs/heads/main"]},"blobname": "minimal-examples-lowlevel/ws-client/minimal-ws-client/README.md", "blob": "# lws minimal ws client\n\nThis connects to libwebsockets.org using the dumb-increment-protocol.\n\nIt demonstrates how to use the connection retry and backoff stuff in lws.\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## Commandline Options\n\nOption|Meaning\n---|---\n-d|Set logging verbosity\n-s|Use a specific server instead of libwebsockets.org, eg `--server localhost`. Implies LCCSCF_ALLOW_SELFSIGNED\n-p|Use a specific port instead of 443, eg `--port 7681`\n-j|Allow selfsigned tls cert\n-k|Allow insecure certs\n-m|Skip server hostname check\n-n|Skip tls usage\n-e|Allow expired certs\n--protocol|Use a specific ws subprotocol rather than dumb-increment-protocol, eg, `--protocol myprotocol`\n\n\n## usage\n\nJust run it, it will connect to libwebsockets.org and spew incrementing numbers\nsent by the server at 20Hz\n\n```\n $ ./lws-minimal-ws-client\n[2020/01/22 05:38:47:3409] U: LWS minimal ws client\n[2020/01/22 05:38:47:4456] N: Loading client CA for verification ./libwebsockets.org.cer\n[2020/01/22 05:38:48:1649] U: callback_minimal: established\n[2020/01/22 05:38:48:1739] N: \n[2020/01/22 05:38:48:1763] N: 0000: 30 0 \n[2020/01/22 05:38:48:1765] N: \n\n...\n```\n\nTo test against the lws test server instead of libwebsockets.org, run the test\nserver as\n\n```\n$ libwebsockets-test-server -s\n```\n\nand run this test app with\n\n```\n$ ./lws-minimal-ws-client -s localhost -p 7681 -j\n```\n\nYou can kill and restart the server to confirm the client connection is re-\nestablished if done within the backoff period.\n","s":{"c":1731526188,"u": 152}} ],"g": 1706,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}