how to establish the socket connection to enduser ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
uniojnqoifazy
Forum Newbie
Posts: 5
Joined: Wed Aug 17, 2011 6:10 am

how to establish the socket connection to enduser ?

Post 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,
User avatar
kasuals
Forum Commoner
Posts: 28
Joined: Thu Aug 11, 2011 12:59 pm

Re: how to establish the socket connection to enduser ?

Post 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.
Last edited by kasuals on Fri Aug 19, 2011 2:40 pm, edited 2 times in total.
User avatar
kasuals
Forum Commoner
Posts: 28
Joined: Thu Aug 11, 2011 12:59 pm

Re: how to establish the socket connection to enduser ?

Post 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.
Post Reply