Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

Node.js Net Module

❮ Built-in Modules


Definition and Usage

The Net module provides a way of creating TCP servers and TCP clients.


Syntax

The syntax for including the Net module in your application:

var net = require('net');

Net Properties and Methods

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

❮ Built-in Modules