How to use the _asyncAccept function from bindings
Find comprehensive JavaScript bindings._asyncAccept code examples handpicked from public code repositorys.
GitHub: ymrdf/socketjs
0 1 2 3 4 5 6 7 8 9
const bindings = require('bindings')('socket.node'); const utils = require('./utils'); bindings.asyncAccept = (fd, cb) => { bindings._asyncAccept(fd,(err, result) => { bindings.asyncAccept(fd,cb); const { fd:clientFd, addr } = result; const client = new Socket(clientFd, addr.sin_family); client.address = addr.s_addr;
2
2
2
+ 6 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)