Skip to content

Instantly share code, notes, and snippets.

msgallagher / chatServer.js
Created Mar 5, 2017 — forked from creationix/chatServer.js
A simple TCP based chat server written in node.js
View chatServer.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