• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Socket IOException

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Im making a chat client, and Im connecting for text chat using basic sockets. A user enters an IP and 2 identical clients handshake with Socket and ServerSocket. It works perfectly (more or less ) in my home network between computers, but outside my router it cant connect to other clients.

Ive tried with several different people in the UK, US and HK, lol. Im giving them my routers IP and my router is forwarding the right port to my computer (or at least I told it to).

Ive tried both entering their IP and them entering my IP and nothing works. it doesnt come back with "UnknownHost" but "IOException". I could understand maybe if couldnt connect to them if they hadnt configured their router, but it should at least let them connect to me, I would have thought.

The only reason I can think that this might happen is if my ISP doesnt support Socket creation which ive heard can happen. Can anyone offer any help or advice on where to go from here, maybe using a different comm method?

thanks
Brendan


******** EDIT
Further to the above information the IOException gives a message saying that the socket is closed. This doesnt make sense..as at one end is a serversocket just listening and at the other end is a socket setting up. argh. well I guess it could be the socket failing to set up and me tryng to use it.

******** 2nd EDIT
Ive been searching other places for a solution to this problem and I was wondering could this be happening because Im not trying to go through a server, i.e Im connecting 2 clients, not going through some server, instead of forwarding through a server?


******** 3rd EDIT
Ive managed to establish a connection but only using an open port like port 80, and the client listening at that port sees nothing.

[ April 16, 2006: Message edited by: Brendan Fosberry ]

[ April 17, 2006: Message edited by: Brendan Fosberry ]
[ April 18, 2006: Message edited by: Brendan Fosberry ]
reply
    Bookmark Topic Watch Topic
  • New Topic