Hello
I have written a Java Program. Server & Client classes opening prior
Socket object. My question is that when I create a server socket on my
computer, client class from any part of the world who knows my IP
address and port no. can connect to that server socket on my computer.
if not then what is the appropriate solution.
Please any kind of help code/ref/suggestion is really appreciated. I am
in need of the answer.
Thanks.
Andrew Thompson - 16 Sep 2006 12:10 GMT
> Hello
> I have written a Java Program. ...
What a coincidence, so has someone over on c.l.j.programmer.
Why don't you follow that thread?
Please refrain from multi-posting in future.
(X-post to c.l.j.help/programmer w/ f-u to c.l.j.p. only.)
Andrew T.
Tor Iver Wilhelmsen - 16 Sep 2006 12:29 GMT
> Hello
> I have written a Java Program. Server & Client classes opening prior
> Socket object. My question is that when I create a server socket on my
> computer, client class from any part of the world who knows my IP
> address and port no. can connect to that server socket on my computer.
Yes, unless there are firewalls or other things in the way. E.g.
Windows XP will throw up a dialog asking if the remote connection
should be allowed.
Remember to farm each connection on the server out to a processing
thread so as not to block the listening thread. Unless you only want
to deal with one client at a time.
Also of interest:
http://www.onjava.com/pub/a/onjava/2004/09/01/nio.html