Client raw socket connection using node.js net module

1,295 views
Skip to first unread message

prerna...@algoexperts.com

unread,
Jun 13, 2013, 9:55:31 AM6/13/13
to nod...@googlegroups.com
Hi All,

I have successfully installed node.js on my Windows system

We are trying to implement raw socket TCP/IP connection with server.

After continuous search and development , i came across net module required by node.js which ultimately fulfill my requirement.

Will net module also helps in getting the asynchronous data from server and allow it to display it in the Client browser ?

As explained in the tutorial ( http://www.hacksparrow.com/tcp-socket-programming-in-node-js.html ), the client.js is executed at the command prompt of Node and the result is displayed respectively. Since "require" is the keyword for node ,  so how'll  execute the client TCP socket connection in the browser?

Sorry if anything is getting misunderstood.

Can you please guide us with the requirements using node.js . 

Thanks in advance,

 

Hage Yaapa

unread,
Jun 13, 2013, 7:16:27 PM6/13/13
to nod...@googlegroups.com
The Node API is not available in the browser environment, so client.js won't work from the browser. Because of security concerns, files system and network access is very restricted from browsers. The closest you can get to what you want to achieve is to use socket.iohttp://socket.io/.

I am the author of that tutorial, btw. Feel free to ask anything.


--
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages