{"_id":"@clusterws/uws","_rev":"7-21ed6bd1016a43f90d3305f2540cdc13","name":"@clusterws/uws","dist-tags":{"latest":"0.7.0"},"versions":{"0.4.7":{"name":"@clusterws/uws","version":"0.4.7","main":"./dist/index.js","types":"./dist/index.d.ts","description":"ClusterWS uWS modified version of uWebSockets","scripts":{"install":"node-gyp rebuild > build_log.txt 2>&1 || exit 0","build":"ts-builder -c ./tsbuild.json"},"engines":{"node":">=8"},"keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","devDependencies":{"@types/node":"^10.7.0","ts-builder":"0.7.4"},"gitHead":"f6ebd98999e77926b9f10b480660deb96764b381","_id":"@clusterws/uws@0.4.7","_npmVersion":"6.3.0","_nodeVersion":"10.8.0","_npmUser":{"name":"goriunovd","email":"goriunovd@gmail.com"},"dist":{"integrity":"sha512-7f82v9UXFzXOBMYGZHnuJP9dLHi/9GgdhXgFi+YHvodKAzdg0lrGJhL7P7/d65oicGtteHBrE3zDIqjl5PO8bw==","shasum":"8024cb3ce48db8e40b019e3994c4860a63f8d1f7","tarball":"https://registry.npmjs.org/@clusterws/uws/-/uws-0.4.7.tgz","fileCount":130,"unpackedSize":5021352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuXClCRA9TVsSAnZWagAAv1YP+wauWT+CYkV7xdQJphKp\nYtn7LmF+cZtobmcwYS4/jizCFUNSA9AYeMp4VDlAbONkM0GPsF1sDyYq2iny\n389Dok00DU8pDpSK0JM8dY/VzN3e9mBR/6v7oOXWOf651yBsoHjj5CQ4G2SR\nm88a0ljLeueA91fFupBh0QzyXMrSr8DzGiIfB5o8hMK5OVLa2k50qm/dQOJn\nVKGi8FIHPb+R+C0bcvKqP5D2p3aeXGcIq555i5fyUqMz31EQrrKY0r8DTvdh\nxF2dEj/HiflOpNdqlCfc9NYf9VkqUbeHAGKt7pQIHJzlw7MserUcMDd+BGRx\na5TUlC6OiHHT40oC2YuuoE1n2U5QEMQFoEZI1HSZ0f+eCgTNe+k/FVQts40w\n4vJf07EIWoBnlo6LEwQ5q29sIWfEh73CdpPipEPrVe/sjMo0cImyD/ll89bR\ndvak8faCreJRZYTpKtzYQBsrDGjy9qsxFauUoWk4NdTuI7x/q8h+Bbio977h\ntRCVuP5sUMKmeL4/+WQRR8k0UvwfugI6K+DpxEPUjgb6W3BtQc3p51dB8lXB\nCCyMHX/DyRnCz/i/FfGGJ0aDUfEPQfg23+2PZFo6uIOJD+r9U82BwHyT/2Sj\nVXT3/gwvXz9QXq5hlZX1IAr8/K9Oc9AUtOh9lYN+chRhwyEqA+P6tTb85HU0\nptyE\r\n=r3UX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzMymd02wXPsUE27Aq80TriPKMhqFQ99tjfQSgBI8C8AIhAKa0/bOoy4LRELjg3a0x1Ed9GG945xc2Y4iFK2HGo3OF"}]},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uws_0.4.7_1538879652382_0.9122077619249951"},"_hasShrinkwrap":false,"deprecated":"0.7.0"},"0.4.8":{"name":"@clusterws/uws","version":"0.4.8","main":"./dist/index.js","types":"./dist/index.d.ts","description":"ClusterWS uWS modified version of uWebSockets","scripts":{"install":"node-gyp rebuild > build_log.txt 2>&1 || exit 0","build":"ts-builder -c ./tsbuild.json"},"engines":{"node":">=8"},"keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","devDependencies":{"@types/node":"^10.7.0","ts-builder":"0.7.4"},"gitHead":"f6ebd98999e77926b9f10b480660deb96764b381","_id":"@clusterws/uws@0.4.8","_npmVersion":"6.3.0","_nodeVersion":"10.8.0","_npmUser":{"name":"goriunovd","email":"goriunovd@gmail.com"},"dist":{"integrity":"sha512-PsRGHC31a/anT/A2vBTkjvHWzYddgeaMErw/A/8aCOWJ4qy+wi00mgmPjUPS/tVsZNEr8Dyscju/bO+fs5OgRg==","shasum":"881e0978198858a219de8f48fdc133af0e10dd19","tarball":"https://registry.npmjs.org/@clusterws/uws/-/uws-0.4.8.tgz","fileCount":130,"unpackedSize":5021370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbuXHxCRA9TVsSAnZWagAAPx4QAIIKSobT8kOguvKjM14x\nDJ+PKAFHYs/gE3mqak2XNILmOhnnhOXJdPIg6P0cTpcNfst+HD5YnwoM3LZu\nbGHlKUchycg8Bxm0B3MFOGeDn+/ox/xX9lnuCMWp+HH/JE2PxY/Esv1zI9YJ\nR11UQ3SLvVFo/24W7F8d24yXxLT4L6mq8k4EDdTrOjc9ZgdySqg1VVarKDtp\nAlAkbiTAuwESHW0Z/nYN9Mf1mlc8JXFC4v6vn2wbdbPJMxKvgqcyru7bapTb\n5nlAny3KmhZdKcZKAHxBSYnvmKcklaimRw0msKZ+0vBe1P/pOSxKTzmoDJge\niNZwyE9eWOKLslbwuWHwP7N2spIhjYNbDfrhXtofPll8SLg4NZx/gG9GmJGW\nZ9Oxqi2w5N07V0ejK7MeoPuJ9K6TicQVmOclgzONs9FAFuc3FpAdELsHjth2\nq9wHc8OIA237Iy+7A/uhOU9x2urq2NDYFJsPVz25A28dZ+IdCFjbJ4MUljl2\neIszcBQgtDGdfVDumma6zP9yb1qvcu8JFesmtQW26131/ZvA7+sh/Blrc1IL\n4u7PLoQudzRGggumCgwk0O3gh+nvKCib906pfr+OsEyaKOOBV3FW/jpLngtW\nEdoeMyqw42GNN/fFh4W2pIgqT8QkVOA1SfpJaZwGJrbv17ydeqXn509vv02+\nrVTv\r\n=3vp+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb/f+B7o9wipWV5s7GkZRX6x3kZh+z1aW0/HB1up64YgIgUbLcFdXEicCuFjOo7mUibbUl5PpTGeE1kphp4xR4428="}]},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uws_0.4.8_1538879983577_0.4075212221071842"},"_hasShrinkwrap":false,"deprecated":"0.7.0"},"0.5.0":{"name":"@clusterws/uws","version":"0.5.0","main":"./dist/index.js","types":"./dist/index.d.ts","description":"ClusterWS uWS modified version of uWebSockets","scripts":{"install":"node-gyp rebuild > build_log.txt 2>&1 || exit 0","build":"ts-builder -c ./tsbuild.json"},"engines":{"node":">=8"},"keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","devDependencies":{"@types/node":"^10.7.0","ts-builder":"0.8.0"},"gitHead":"c2ef3def6c685aad867e25a6ac81e96e8e90e5f1","_id":"@clusterws/uws@0.5.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"goriunovd","email":"goriunovd@gmail.com"},"dist":{"integrity":"sha512-6MWTGlkUubjn+D/JSLMBsM0xezb8PLU8o1yp24O7wXFA+YKQEwdI0Ce+xWSnpLM1LbFnVUbGXXydiXwcb0mArw==","shasum":"8e883a171ef74d69e6c082bd5580ae1378710fd2","tarball":"https://registry.npmjs.org/@clusterws/uws/-/uws-0.5.0.tgz","fileCount":133,"unpackedSize":6400642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0Bw9CRA9TVsSAnZWagAA+48QAI62PopiaiNl5YkwFBg/\noIkT5Ji6e9NSWNuX9yzvklFxmL68eethePTmzBjIxbDpjCMBvVErGgwHMZxo\n8rm4Zs56RFqspU7qkqbSm5gDcjiRy/jSgALi7KOJhc/Y1bM8ZdcGfQ0iQgYq\n/w7arx1sRBRaTM1Ve5DFAt92ifKjOCXyun+5zU5BTi89TVQ+We+12WKc9GPF\n6zNVCpWROBC9RbzTDzWBDO6j7wBnZa7cLjGj//LC7Jv7bwwkruCvL6DPRita\ntCao8cNpHU14bvLgSA6ZxTzuYtOcUaOTP3KCYgKIpxPLXJ4Mz/BZ2nfYnVvi\njk6MyLbtU6mHbKGBoidXeB6AA/J1zWVBlUlEEoMKafbB2Wf5M8SffWWy51yP\ngoK/08aiGQJrtflxnPV/ZKOrqMRanihLfK5vzHrLfSAwyHVTgFpwK1P5RabP\nA/nwnvI+rGjUrtF8jw/8oFilmysl8tSYHK8Cny4oziv9nEV6Kd9UI+Hyi7Hw\nMwH2isf6JqgTY93BByKiNfZTvM/krVUBm/UtqZlCUI9664GpDQJD/TpFCgq7\nl42UedMyGmRY2mHRNDWb43QZUb4NI0jirpKYLffJ2tn5pagNVYDqV1NzB22j\nFTV0rX5zUSCmmFhkRx0Q7VeXBoMpehaqfSB/Tti8Pg9FELt6Prg0FPO3qwq6\n4tnQ\r\n=b3D7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD58IxCCrwC5vhod9NmhIWI/i0kk07qWoeuTIPxYLUD0wIhAJwIfL3vFYV2HGaVQNFHCRzEghk80pECTro+Z4QDRDTf"}]},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uws_0.5.0_1540365372733_0.7925035206981483"},"_hasShrinkwrap":false,"deprecated":"0.7.0"},"0.6.0":{"name":"@clusterws/uws","version":"0.6.0","main":"./dist/index.js","types":"./dist/index.d.ts","description":"ClusterWS uWS modified version of uWebSockets","scripts":{"install":"node-gyp rebuild > build_log.txt 2>&1 || exit 0","build":"ts-builder -c ./tsbuild.json"},"engines":{"node":">=8"},"keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","devDependencies":{"@types/node":"^10.7.0","ts-builder":"0.8.0"},"gitHead":"e6bba13d2e63b627303cd9af22baa3252c79a0f9","_id":"@clusterws/uws@0.6.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"goriunovd","email":"goriunovd@gmail.com"},"dist":{"integrity":"sha512-PnXivWVwwnsg402/ITlHYf7OO0ubk5UQY5HLU5IGc0f+/E3b/87kFGkmowM0yozTxIOsmRk7RgC5VyDV/U4NOQ==","shasum":"3344247eb19f6692a28eafe8fd5640a3a21e0331","tarball":"https://registry.npmjs.org/@clusterws/uws/-/uws-0.6.0.tgz","fileCount":133,"unpackedSize":6401774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2AJeCRA9TVsSAnZWagAA9wsP/1Hq2d98Venmg0bmY+1j\nA68v7n9D2aiUxIkZxq/BBNJBKZpXqld31Mx/iiE+cQOLy3FvkUQhJH3kMg+7\n3YpUYIhZNyc5CWhn7+s+78QDDvwTJMDkhiSQc05jY836K343QphB0tRRvx04\n3gSY7jFe1p9qZaKhhY2alK2XjGxLagNUJbWHMBvjJxrzRHf7Z+J5dMudNyN3\n/ZKy3e7m6sv0ymISH2kXpCR5U+k+qJ7vX9VAt8RejH8++9LcYNf26hvPHJFD\nXFX6PKESEo3jBwQIkUq4kN4jnDSSQ8xxAQwH78tVVPilezgrsfpqKmkWWDq8\nlQMhCPh0e+m0cXFx5aGTowm8RjK7cVmswrAZSJdB0MYdj/qczptJ50gaKi4X\nrJrA/mqBuohMFrxsWc4avZJOhu3AEubHLY7Hn6R7dHZgh7YpAd/ZJA7yaPLZ\nlrhwi/0TGbMzPW+8xyeXUIW0vhInGpCdjY1MtbjDodU2Ce7y164/Bda/MktT\njzM5b3lKoa/F8obcUsWGS9NSOP74WNT/IQhv8H6x7Vktu5bO8iw7BQmAKQE2\nmRfzTGlH/DJpJV+o/dIH3ub538reQfeGWGNYjUkspgsD4XH9EKbsVLVnCu9L\nAnVQEoC9+AbChwUzewxaoX4zCiso+7llCq8l2B7dVQ/4EpZPsLsBdvfl1x8I\nnq8U\r\n=mHxw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB9J0ismG1YNDhbIC2oH5hkUZmKhU6VA/UTpDJuxsgAyAiEAnhj4IuMsvf+kaUER/h4MIOcKsPBkixQk6/UblO9/Hkc="}]},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uws_0.6.0_1540883037825_0.4920097949620428"},"_hasShrinkwrap":false,"deprecated":"0.7.0"},"0.7.0":{"name":"@clusterws/uws","version":"0.7.0","main":"./dist/index.js","types":"./dist/index.d.ts","description":"ClusterWS uWS modified version of uWebSockets","scripts":{"install":"node-gyp rebuild > build_log.txt 2>&1 || exit 0","build":"ts-builder -c ./tsbuild.json"},"engines":{"node":">=8"},"keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","devDependencies":{"@types/node":"^10.7.0","ts-builder":"0.8.0"},"gitHead":"491cc44819f6a2c769d05fca0f330d60a638c733","_id":"@clusterws/uws@0.7.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"goriunovd","email":"goriunovd@gmail.com"},"dist":{"integrity":"sha512-3u0O5HgPAWQsN+XmuOlFlXfGNrorx3/8kQhsFqe+p+F6mgpuPP7BI8VyyPnhONxD7PxVXmeoQhvYJy2oNBJeew==","shasum":"960bd0c8e6b6d4a26bdc340afacf9e788e8e92d4","tarball":"https://registry.npmjs.org/@clusterws/uws/-/uws-0.7.0.tgz","fileCount":133,"unpackedSize":6402037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb98f3CRA9TVsSAnZWagAA10gP/jtI4g//vJodMreCybdj\ngOga5EF6gOq3jy1+uY0qafLJmoL6BU/XM/yJtvAWkd6kPzwl4PBz9O2WFUK4\nqK/qFLtO9EhcU+zlMCpwhmEZ/C1UDdTpcxOdb3F7cOwcpHx1p85sCaWGhhds\nU21K6ke1Q62LgA5tCCmcqBO1NNaC1NPCsMos5LXgPu2lME1xANBnlAZxqjbo\njSlB4oRp5XiXdPolJ0/pmUYJArHbY56xRvkwNugRoqchcG2CwItM6AmbY76p\nkhOE7VqEtQafLjclbvFb3F2YUxgZrlRJCn61BkPzmqxosvQbw96zIv0JFh+X\n1Z5jwWKmnmzxaV7X/dFhyhsfTaIAK93YZfYtLfDMNgmgW0sdq+9QfOCgSfwO\nSJLWpNNB9jdXJWECfLzKS7J6HRWEgjYa9rgtUs70CHbu6z/Vzq/TaqzfL3U4\nXLHwzTeYbIA8vCqkrDgAHUiYF2PCQ1evHikRXcbexg5WgSzlClfui07XyFOE\nV1lLlOpZMsMI9wHWnu04WrtOJMSe8Fsuy7Ld3pkN5C1UeyMuSY/AHH8MeWIO\nGWM7kiNpkMvLu8jwNS4YNX8idlFqAGmxLbpkE3jEY/gnrBAHrJW7lzi58xAW\n9omHnHDSj8dk/m9jD34vfkaP9V7Zw7ny/BnYDkck2iWMqy/TOexMPmGaUK4z\n/T0A\r\n=o3GV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUQ3LP6L8knpy8A4ifSNNGm30qC+4NQs7QQqEBAJ8i6AiBvF1zYhBczqFkwW/8f8ksSFTIoez9vgSDP8ZfLfQM+dQ=="}]},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uws_0.7.0_1542965238299_0.297780443921583"},"_hasShrinkwrap":false,"deprecated":"Please use @clusterws/cws instead"}},"time":{"created":"2018-10-07T02:34:12.218Z","0.4.7":"2018-10-07T02:34:12.625Z","modified":"2022-04-04T23:41:28.344Z","0.4.8":"2018-10-07T02:39:43.808Z","0.5.0":"2018-10-24T07:16:13.045Z","0.6.0":"2018-10-30T07:03:58.220Z","0.7.0":"2018-11-23T09:27:18.481Z"},"maintainers":[{"name":"goriunovd","email":"goriunovd@gmail.com"}],"description":"ClusterWS uWS modified version of uWebSockets","keywords":["tiny","websocket","clusterws","uws"],"license":"MIT","readme":"<h1 align=\"center\">ClusterWS/uWS Implementation</h1>\n<h6 align=\"center\">Modified version of <a href=\"https://github.com/uNetworking/uWebSockets\">uWebSockets</a></h6>\n\n<p align=\"center\">\n <img src=\"https://cdn.rawgit.com/goriunov/159120ca6a883d8d4e75543ec395d361/raw/d22028ecc726d7d3cc30a2a85cc7cc454b0afada/clusterws.svg\" width=\"450\">\n</p>\n\n<i>This module is modified version of the uWebSockets with some minor tweaks in C++ code and complete rewrite of JS code to TS. Original software is available in <a href=\"https://github.com/uNetworking/uWebSockets\">uWebSockets</a> repository.</i>\n\n<a href=\"https://badge.fury.io/js/%40clusterws%2Fuws\"><img src=\"https://badge.fury.io/js/%40clusterws%2Fuws.svg\" alt=\"npm version\" height=\"22\"></a>\n\n\nThis repository is based on the <a href=\"https://github.com/uNetworking/uWebSockets\">uWebSockets</a> therefore has two licence [ClusterWS MIT](https://github.com/ClusterWS/uWS/blob/master/LICENSE) and [Alex Hultman ZLIB](https://github.com/ClusterWS/uWS/blob/master/src/LICENSE).\n\nBig thanks to [SirAnthony](https://github.com/SirAnthony) for ssl workaround (has been taken from [SirAnthony's uWebSockets fork](https://github.com/hola/uWebSockets-bindings)).\n\n**Please consider to support ClusterWS development:**\n- [Become a Backer on Patreon](https://www.patreon.com/clusterws) \n- [One time Donation via PayPal](https://www.paypal.me/goriunov)\n\n\n\n### Installation\n\n```js\nnpm i @clusterws/uws\n```\n\n### Server example\n\nuWebSockets node was designed to mimic node js [ws](https://github.com/websockets/ws) module there are some things which are not available in uWebSockets.\n\n```js\n// use WebSocketServer to create server\nconst { WebSocketServer } = require('@clusterws/uws');\n\n// Create websocket server \nconst server = new WebSocketServer({ port: 3000 }, () => {\n    console.log('Server is running on port: ', 3000)\n});\n\n// Accept ws connections\nserver.on('connection', (socket, upgReq) => {\n    // gives you remoteAddress info\n    let address = socket._socket \n    // emitted when receive new message\n    socket.on('message', (message) => { });\n\n    // emitted when connection closes \n    socket.on('close', (code, reason) => { });\n\n    // emitted on error\n    socket.on('error', (err) => { });\n\n    // emitted when pong comes back from the client connection\n    socket.on('pong', () => { \n      // make sure to add below line (important to do not drop connections)\n      socket.isAlive = true;\n    });\n\n    // emitted when get ping from the server (if you send)\n    socket.on('ping', () => {})\n\n    // this function accepts string or binary (node buffer)\n    socket.send(message)\n\n    // destroy connection\n    socket.terminate()\n\n    // close connection\n    socket.close(code, reason)\n\n    // to manually send ping to the client\n    socket.ping()\n});\n\nserver.on('error', (err, socket) => {\n  // in some cases there is not socket param\n  // handle http errors, TLS errors, ... \n})\n\n// Start auto ping (second parameter is type of ping `false` is low level)\n// use `false` most of the time except if you want to track ping pong on the client side \n// which does not have onping & onpong methods (like browser websocket)\n// check Handle AutoLevelPing In Browser Example part below\n// event if you use app level ping server onPong will be called\nserver.startAutoPing(20000, false)\n\n// broadcast to all connected clients\n// message: string | binary (node buffer)\n// options?: { binary: true | false }\nserver.broadcast(message, options)\n\n// destroy or close server\nserver.close(callback)\n\n```\n\n\n### Client example\n\n```js\n// Client part is pretty much the same as in server\n// use WebSocket to create client\nconst { WebSocket } = require('@clusterws/uws');\n\nconst socket = new WebSocket('ws://url:port');\n\n// emitted when websocket is connected\nsocket.on('open', () => {})\n\n// emitted when receive new message\nsocket.on('message', (message) => { });\n\n// emitted when error happens\nsocket.on('error', (err) => {})\n\n// emitted on close websocket\nsocket.on('close', (code, reason) => {})\n\n// emitted when get ping from the server (if you send)\nsocket.on('ping', () => {})\n\n// emitted when get pong from the server (if you send)\nsocket.on('pong', () => {})\n\nsocket.ping() // manually send ping to the server\n\nsocket.send(msg) // send message to the server binary | string\n\nsocket.terminate() // destroy connection\n\nsocket.close(code, reason) // close connection\n\n```\n\n\n### Handle AppLevelPing In Browser Example\nThis is just an example of handling app level ping pong from the client side which does not have `onping` and `onpong` methods available \n\n**Note** if your clients have `onping` and `onpong` methods (or similar) do not send `appLevel` ping from the server as it requires more work.\n```js\nsocket.binaryType = 'arraybuffer' // Do not forget to set to `arraybuffer`\nsocket.onmessage = function (message) {\n    if (typeof message.data !== 'string') {\n        let buffer = new Uint8Array(message.data);\n        if (buffer[0] === 57) {\n            // output should be an array with one bit and [0] is === 65\n            return socket.send(new Uint8Array(['A'.charCodeAt()]));\n        }\n\n        // process with your binary data\n    }\n    // process with your string data\n}\n```\n","readmeFilename":"README.md"}