1.3.0 • Published 7 years ago

@naxmefy/socket v1.3.0

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

@naxmefy/socket

Installation

$ npm install @naxmefy/socket --save

Usage

For detailed usage, see Node.js documentation on net.Socket - https://nodejs.org/api/net.html#net_class_net_socket.

Quick example:

const Socket = require('@naxmefy/socket')
var socket = Socket.connect(1337, 'localhost')

socket.setEncoding('utf8')
socket.on('connect', function () {
	// connected

socket.end('hey')
	socket.destroy()
})

HINT: To prevent socket from reconnecting, use .destroy() method to completely close it.

Tests

$ npm test

License

MIT

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago