Moduł sieciowy Node.js

❮ Wbudowane moduły


Definicja i użycie

Moduł Net umożliwia tworzenie serwerów i klientów TCP.


Składnia

Składnia dołączania modułu Net do aplikacji:

var net = require('net');

Właściwości i metody netto

Method Description
connect() Creates a new connection to the server, and returns a new Socket
createConnection() Creates a new connection to the server, and returns a new Socket
createServer() Creates a new server
isIP Checks if the specified value is an IP address
isIPv4 Checks if the specified value is an IPv4 address
isIPv6 Checks if the specified value is an IPv6 address

❮ Wbudowane moduły