Module réseau Node.js
Définition et utilisation
Le module Net permet de créer des serveurs TCP et des clients TCP.
Syntaxe
La syntaxe pour inclure le module Net dans votre application :
var net = require('net');
Propriétés et méthodes nettes
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 |