Skip to content

Instantly share code, notes, and snippets.

@andrewschaaf
Created June 13, 2011 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewschaaf/1023846 to your computer and use it in GitHub Desktop.
Save andrewschaaf/1023846 to your computer and use it in GitHub Desktop.
net = require 'net'
hexy = require 'hexy'
server = net.createServer (c) ->
c.on 'data', (data) ->
console.log '------ got data: ------'
console.log hexy.hexy data
responseData = new Buffer [0]
c.write responseData
console.log '------ sent data: ------'
console.log hexy.hexy responseData
server.listen 9000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment