Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"en-US,en;q\u003d0.5", "gen_ut":1606540069, "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": "41240965cf0359128c7c51cd35d6bd6d0bc95bb0", "alias": [ "refs/heads/main","refs/heads/master"]},"tree": [ { "name": "CMakeLists.txt","mode": "33188", "size":654}, { "name": "README.md","mode": "33188", "size":1313}, { "name": "minimal-raw-netcat.c","mode": "33188", "size":6199}],"s":{"c":1606540069,"u": 194}} ,{"schema":"libjg2-1", "cid":"dcfcf06c57627b161d7166dc4db4912d", "oid":{ "oid": "41240965cf0359128c7c51cd35d6bd6d0bc95bb0", "alias": [ "refs/heads/main","refs/heads/master"]},"blobname": "minimal-examples/raw/minimal-raw-netcat/README.md", "blob": "# lws minimal raw netcat\n\nThis example shows to to create a \u0022netcat\u0022 that copies its stdin to\na remote socket and prints what is returned in stdout.\n\nIt has some advantage over the real netcat, it will wait 1s after stdin closes\nto print results that are in flight.\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## usage\n\n```\n $ echo -e -n \u0022GET / http/1.1\u005cr\u005cn\u005cr\u005cn\u0022| ./lws-minimal-raw-netcat\n[2018/05/02 08:53:53:2665] USER: LWS minimal raw netcat [--server ip] [--port port]\n[2018/05/02 08:53:53:2667] NOTICE: Creating Vhost 'default' (no listener), 1 protocols, IPv6 off\n[2018/05/02 08:53:53:2703] USER: Starting connect...\n[2018/05/02 08:53:53:5644] USER: Connected to libwebsockets.org:80...\n[2018/05/02 08:53:53:5645] USER: LWS_CALLBACK_RAW_ADOPT\n[2018/05/02 08:53:53:5645] USER: LWS_CALLBACK_RAW_ADOPT_FILE\n[2018/05/02 08:53:53:5646] USER: LWS_CALLBACK_RAW_RX_FILE\n[2018/05/02 08:53:53:5646] USER: LWS_CALLBACK_RAW_CLOSE_FILE\n[2018/05/02 08:53:53:8600] USER: LWS_CALLBACK_RAW_RX (186)\nHTTP/1.1 301 Redirect\nserver: lwsws\nStrict-Transport-Security: max-age\u003d15768000 ; includeSubDomains\nlocation: https://libwebsockets.org\ncontent-type: text/html\ncontent-length: 0\n\n```\n\nNote the example does everything itself, after 5s idle the remote server closes the connection\nafter which the example continues until you ^C it.\n","s":{"c":1606540069,"u": 93}} ],"g": 983,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}