Skip to content

Instantly share code, notes, and snippets.

@zackiles
zackiles / bind_hack.js
Created November 26, 2015 00:10 — forked from tralamazza/bind_hack.js
node.js bind() hack
/*
* Author: Daniel Tralamazza <tralamazza@gmail.com>
*
* Patch Socket for a before connect event.
* Important! You must require this module before anything else.
*
* Usage:
*
* var patch = require('./bind_hack');
* var bind_f = process.binding('net').bind;