Source from node
Removed unnecessary stuff. Some methods are not implemented, but it seems to be enough for Node.js' net module