Skip to content

Instantly share code, notes, and snippets.

@msgallagher
msgallagher / chatServer.js
Created March 5, 2017 09:24 — forked from creationix/chatServer.js
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