net

Net

Stability: 2 - Stable

The net module provides you with an asynchronous network wrapper. It contains functions for creating both servers and clients (called streams). You can include this module with require('net');.

Class: net.Server

This class is used to create a TCP or local server.

net.Server is an EventEmitter with the following events:

Event: 'close'

Emitted when the server closes. Note that if connections exist, this event is not emitted until all connections are ended.

Event: 'connection'