Skip to content

Instantly share code, notes, and snippets.

View j0hnm4r5's full-sized avatar

John Mars j0hnm4r5

View GitHub Profile
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active October 9, 2024 11:32
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');