{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752653497,
"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": "dccb61dae7a87b723f8d325303dcf2e7edec8322", "alias": []},"tree": [
{ "name": "CMakeLists.txt","mode": "33188", "size":650},
{ "name": "README.md","mode": "33188", "size":1490},
{ "name": "minimal-raw-file.c","mode": "33188", "size":3780}],"s":{"c":1752653497,"u": 369}}
,{"schema":"libjg2-1",
"cid":"d44c3a23ba013cb91c545ee19d432b1a",
"oid":{ "oid": "dccb61dae7a87b723f8d325303dcf2e7edec8322", "alias": []},"blobname": "minimal-examples/raw/minimal-raw-file/README.md", "blob": "# lws minimal ws server\n\nThis demonstrates adopting a file descriptor into the lws event\nloop. The filepath to open and adopt is given as an argument to the example app, eg\n\n```\n $ ./lws-minimal-raw-file \u003cfile\u003e\n```\n\nOn a Linux system, some example files for testing might be\n\n - /proc/self/fd/0 (stdin)\n - /dev/ttyUSB0 (a USB \u003c-\u003e serial converter)\n - /dev/input/event\u003cn\u003e (needs root... input device events)\n\nThe example application opens the file in the protocol init\nhandler, and hexdumps data from the file to the lws log\nas it becomes available.\n\nThis isn't very useful standalone as shown here for clarity, but you can\nfreely combine raw file descriptor adoption with other lws server\nand client features.\n\nBecuase raw file events have their own callback reasons, the handlers can\nbe integrated in a single protocol that also handles http and ws\nserver and client callbacks without conflict.\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## usage\n\n```\n $ ./lws-minimal-raw-file /proc/self/fd/0\n[2018/03/22 10:48:53:9709] USER: LWS minimal raw file\n[2018/03/22 10:48:53:9876] NOTICE: Creating Vhost 'default' port -2, 1 protocols, IPv6 off\n[2018/03/22 10:48:55:0037] NOTICE: LWS_CALLBACK_RAW_ADOPT_FILE\n\n[2018/03/22 10:48:55:9370] NOTICE: LWS_CALLBACK_RAW_RX_FILE\n[2018/03/22 10:48:55:9377] NOTICE: \n[2018/03/22 10:48:55:9408] NOTICE: 0000: 0A . \n\n```\n\nThe example logs above show the result of typing the Enter key.\n","s":{"c":1752653497,"u": 120}}
],"g": 2464,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}