Package Exports
- libaio
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (libaio) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
libaio
Asynchronous operations implemented using libjs
.
This package is in a prototype stage as a proof of concept, it implements
a basic asynchronous SocketTcp
class using epoll
and fcntl
system
calls from libjs
. See below and async GET
request example:
import * as socket from 'libaio';
var sock = new libaio.SocketTcp();
sock.onconnect = () => {
console.log('Connected');
sock.write('GET /\n\n');
};
sock.ondata = (data) => {
console.log('Received:');
console.log(data);
};
sock.connect({host: '192.168.1.150', port: 80});