npm support

made it require-able through npm.

also fixed passing the socket to the listeners.

plus fixed a recursion bug and exposed the address and port stuff.