add package.json for npm
be able to require
pass TCPSocket instance to listeners
expose address and ports
delete nextmessage before emitting message to prevent recursion