Skip to content

Instantly share code, notes, and snippets.

View dcatanzaro's full-sized avatar

Damian Catanzaro dcatanzaro

View GitHub Profile
@creationix
creationix / chatServer.js
Created November 19, 2010 20:47
A simple TCP based chat server written in node.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client