You can clone with
foo.js should connect to bla.js, etc.
However this doesn't work because foo.js throws the following exception:
throw arguments; // Unhandled 'error' event
Error: NsSocket: sending on a bad socket
at NsSocket.send (/Users/dscape/Desktop/dev/nodejitsu/nssocket/lib/nssocket.js:101:31)
at Socket.<anonymous> (/Users/dscape/Desktop/dev/nodejitsu/nssocket/examples/foo.js:10:14)
at Socket.EventEmitter.emit (events.js:123:20)
at Object.afterConnect [as oncomplete] (net.js:751:10)
This is because the socket is not considered to be connected: While it is a writable socket it is not readable as no server is created in the foo.js example.
this.connected = this.socket.writable && this.socket.readable || false;
this.connected = this.socket.writable || this.socket.readable || false;
Would solve the issue, but I'm unaware of other consequences this could have. Thoughts?
This issue's title is hilarious.
Lost comment from @hij1nx found in my Github feed.
That img kind of takes my comment out of context; either way, I recommend using github.com/hij1nx/vines
Kinda conflating two things no? Why don't the examples work?
It depends on why the issue came up. But @dscape's suggestion looks perfectly fine to me. This issue appears to have been introduced with the addition of binary support. We should consider this a review. I will close and look to @dscape for his commit.
The issue still exists, so we should leave it open yeah? @dscape can reference it in his PR.
Fixed in #17.