I had started looking at that, thank you. So here is what I need to do to 
communicate to the server.

The server has created a UNIX domain socket, lets call it 
/tmp/connect_to_me and it is listening on it for connections.
Lets switch to C++ for a second since the server is in C++
So client attempts to connect to /tmp/connect_to_me, the server accepts 
that and returns a "file descriptor" to the client for reading and 
writing...
That is what my node client has to do.

So now having read the net module, I can net.connect to /tmp/connect_to_me 
but now I can read and write from the domain socket which is 
not what I need to do, I need to read and write from the "file descriptor" 
or stream returned to me by the server. And that is what I am trying to 
solve.

Any thoughts?



On Monday, April 14, 2014 3:55:49 PM UTC-7, mscdex wrote:
>
> On Monday, April 14, 2014 5:07:42 PM UTC-4, Reza Razavipour wrote:
>>
>> I was planning on using socket.io to connect to my node.js client to a 
>> server using POSIX sockets.
>>
>> The server is being redesigned to support domain sockets since both 
>> server and my node client will always run on the same host.
>>
>> Can I still use socket.io module or do I have to look for some other 
>> module?
>>
>> If not, any module recommendation?
>>
>
> socket.io is generally for browser<-->server communication. I think your 
> situation would be better off with a plain 'net' socket and supplying a 
> path to the unix socket instead of an IP and port: 
> http://nodejs.org/api/net.html#net_net_connect_path_connectlistener
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to