Page 1 of 1

how to establish the socket connection to enduser ?

Posted: Fri Aug 19, 2011 4:04 am
by uniojnqoifazy
hi all ,
i have running a server program establishes a socket connection on A_server , then i want to establish the socket connection to connect A_server from enduser when user visit my site (http://testsite/) ,
i have try to using java to do socket connection , then using exec to call jar , but i found the connection is webserver connect to A_server , not enduser connect to A_user ,
anyone can give me more hint about it ? how to do ?


cheers,

Re: how to establish the socket connection to enduser ?

Posted: Fri Aug 19, 2011 2:14 pm
by kasuals
I would hope, based on what I think you're asking... that you can't open a socket connection on my system because I visited your site without me downloading something. :P

*edit*

Any socket programming I used to do was in Java or C, and it was required to be executed by the end user. Otherwise, yes it was executed by the webserver and the socket was webserver->destination. Never enduser->destination. This would be a huge security risk imo.

(ps edit) Pretty sure I was able to establish socket connections in PERL too. Again, client side only. I would think the union between sockets and the kernel do not allow outside influences to open sockets (unless sockets are strictly enforced by JUST the interpreter these days (which is still server side)), I'd assume the kernel would disallow it. Unless things have changed.

Re: how to establish the socket connection to enduser ?

Posted: Fri Aug 19, 2011 2:36 pm
by kasuals
You could maybe redirect the client to a port based on a URL link? Then again, they'd have to have software installed to communicate with that port.