Skip to main content

Socket

Well, sockets.

Construction

const s = new Socket(domain, type);
const s = new Socket(AF_INET, SOCK_STREAM);

Methods

connect

connect(host, port);

bind

bind(host, port);

listen

listen();

send

Send data with Buffer

send(data);

recv

Receive data to a buffer

recv(size);

close

close();