net-browserify
net
module for browserify, with a websocket server proxy.
Supported methods:
net.connect(options, cb)
net.isIP(input)
,net.isIPv4(input)
,net.isIPv6(input)
Examples are available in examples/
.
How to use
For the client
Just require this module or map this module to the net
module with Browserify.
$ npm install net-browserify
You can set a custom proxy address if you want to:
var net = ; // Optionaly, set a custom proxy address// (defaults to the current host & port)net; // Use the net module like on a servervar socket = net; socket;
For the server
var express = ;var netApi = ; // Create our appvar app = ; app; // Start the servervar server = app;
You can also specify some options:
app;
License
The MIT license.