creationix/howtonode.org — pull request #103 by bluesm (2014-07-12 21:29:03+00:00)
Title: Updated hello-tcp.js due to API changes.

The "connect" event is assigned to handler that is passed to the createServer method.

The previous example didn't work since apparently you cannot assign again handler for "connect" event.

Replace sys.put with console.log, otherwise I would have to require 'sys'. (In previous node version probably that object was set as global)