Skip to content

Instantly share code, notes, and snippets.

View tomfun's full-sized avatar

Greg tomfun

  • itrdev
  • ukraine
View GitHub Profile
@tomfun
tomfun / nodejs-tcp-example.js
Last active February 25, 2016 18:01 — forked from tedmiston/nodejs-tcp-example.js
Node.js tcp client and server example
/**
env SERVER=1 node 3.js
http://joxi.ru/n2YYBPdcjnbK42
http://joxi.ru/DmB74bJFN8JoB2
*/
/*
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.