Skip to content

Instantly share code, notes, and snippets.

@photofroggy
Created July 8, 2012 22:56
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 photofroggy/3073333 to your computer and use it in GitHub Desktop.
Save photofroggy/3073333 to your computer and use it in GitHub Desktop.
io.sockets.on('connection', function (socket) {
var client = net.connect({host: 'chat.deviantart.com', port: 3900});
client.on('data', function(data) {
socket.send( data );
});
client.on('end', function() {
socket.disconnect();
});
socket.on('message', function (data) {
client.write(data);
});
socket.on('disconnect', function () {
client.end();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment