Modulo di rete Node.js
Definizione e utilizzo
Il modulo Net fornisce un modo per creare server TCP e client TCP.
Sintassi
La sintassi per includere il modulo Net nell'applicazione:
var net = require('net');
Proprietà e metodi netti
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 |