8000 GitHub - holepunchto/bare-net: TCP and IPC servers and clients for JavaScript
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

holepunchto/bare-net

Repository files navigation

bare-net

TCP and IPC servers and clients for JavaScript.

npm i bare-net

Usage

const net = require('bare-net')

const server = net.createServer()
server.on('connection', (socket) => socket.on('data', console.log))
server.listen(() => console.log('server is up'))

const { port } = server.address()
const socket = net.createConnection(port)
socket.write('hello world')

License

Apache-2.0

About

TCP and IPC servers and clients for JavaScript

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0