Re: Socket Won't Connect
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 19:32:46 -0700
On Tue, 29 Apr 2008 19:20:07 -0700, Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Chase Preuninger wrote:Does anyone have any idea why when I create socket connections like
shown they only really work when I test them on my local machine or
when I test them on 2 computers on my wireless network. Other than
that I can't get a peer to peer connection to work.
Socket s = new Socket(Some InetAddress Object, Some Port);
Do you have a firewall in the way?
Or a NAT router? Or a proxy? Or something that performs two or more of those functions?
As Knute's reply suggests, if you're having trouble connecting in situations other than being on the same local computer or LAN, the most common reason is that your network is not correct configured to allow the connections to go through.
Writing network code involves a lot more than just using the Socket class. If you expect to be successful, you'll need to take some time to learn about how networking itself works, as well as the specific protocols you plan on using.
Pete
.
- References:
- Socket Won't Connect
- From: Chase Preuninger
- Re: Socket Won't Connect
- From: Knute Johnson
- Socket Won't Connect
- Prev by Date: Re: Socket Won't Connect
- Next by Date: Re: servlet annotations for URL mapping?
- Previous by thread: Re: Socket Won't Connect
- Next by thread: Re: Socket Won't Connect
- Index(es):
Relevant Pages
|