5 Replies Latest reply: Feb 22, 2007 10:11 PM by 807597 RSS

    socket connection

    807596
      Hello friends ,Respected teachers ..
      I have made chat application .It is working fine with local intranet. I used the
      Socket s=new Socket(190.10.10.23,1005); for creating server side socket in client program. But when I host the aplication on a server ( I have a server at US .) then what should be specified as InetAddress in Socket's constructor in client program to make it work smoothly ?Server program is working fine on my US server as I just created Serversocket and called its accept method.
      How to make connection with live server ? I tried to give its static IP in sockets constructor at client program but its not working .Chat server in US is unable to identify any chatClient .
      Can anybody plz help me on this....
      Thanks and Regards
      Rohit
        • 1. Re: socket connection
          807596
          Can you ping your server machine from your client machine? Are there firewalls between these machines?
          • 2. Re: socket connection
            807596
            Thanks for reply..I tried pinging my machine with the server it gave Request time out for 2-3 times approx and console got closed automatically.....Regarding firewall there is no firewall between server and client.
            so what conclusion can be drawn from this..any idea ?
            Thanks and Regards.
            Rohit
            • 3. Re: socket connection
              807596
              If you can't ping the server the problem is not your Java program, its in the network. Is one or both of the addresses in one these address ranges?

              10.0.0.0 through 10.255.255.255
              172.16.0.0 through 172.31.255.255
              192.168.0.0 through 192.168.255.255

              If so its a private and is not visible over the internet.
              • 4. Re: socket connection
                807596
                Sorry for replying late....here we had net problems so was unable to reply....
                Thanks very much for u r response..It helped me a lot and now I have solved the problem coz of u r help..
                Thank you
                bye.
                • 5. Re: socket connection
                  807597
                  i just read that u hav created chat appli for local intra net can u please tell me wer shud i start i want to create chat application? thanks