Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to listen on unix sockets #34

Closed
wants to merge 3 commits into from

Conversation

jcrugzz
Copy link
Member

@jcrugzz jcrugzz commented Feb 15, 2013

Implements #20. I have been working on the tests but I wanted to ask if there is a good way to test the unix socket case without creating more and more unix.sock files in the directory. First time dealing with them. @mmalecki thoughts?

@@ -158,6 +173,11 @@ Client.prototype.connect = function (port, host, callback) {
callback();
}
}
else if (this.type === 'unix') {
this.socket = new net.Socket({type: 'unix' });
this.socket.setEncoding('utf8');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to force this encoding type? http://nodejs.org/api/stream.html#stream_stream_setencoding_encoding

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a good chance to utilize options.encoding

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I suppose not. I was just following what was done for TCP.

@jcrugzz
Copy link
Member Author

jcrugzz commented Feb 26, 2013

Thanks to a little help from @blakmatrix I got the tests working for the unix sockets.

@indexzero
Copy link
Member

Cherry-picked. Thanks!

@indexzero indexzero closed this Mar 9, 2013
@jcrugzz jcrugzz deleted the unix-sockets branch March 9, 2013 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants