dcsimg
Unable to create a socket connection through internet in an applet chat programe.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Naveen_Varma
Posted On:   Saturday, May 10, 2003 02:43 AM

I have a problem in my chat code, In my chat i am trying to make a socket connection at a particular server at a particular port from an applet. when I run the chat through a pc in Same network (LAN) it works fine socket connection is made but when i try to make the connection from a pc outside that LAN(frof cyber cafe) , the request for connection don't reach at all to server. This is very crucial to me . i request if any one can help code snippets :- cliebnt side void connect(){ try { String s7="192.35.67.....";//server ip in s7 try { url = new URL(s7); } catch(MalformedURLException malformedurlexception) { }    More>>

I have a problem in my chat code,

In my chat i am trying to make a socket connection at a particular server at a particular port from an applet.

when I run the chat through a pc in Same network (LAN) it works fine socket connection is made but when i try to make the connection from a pc outside that LAN(frof cyber cafe) , the request for connection don't reach at all to server.

This is very crucial to me . i request if any one can help

code snippets :-
cliebnt side

void connect(){
try
{
String s7="192.35.67.....";//server ip in s7
try
{
url = new URL(s7);
}
catch(MalformedURLException malformedurlexception) { }
s=new Socket(url.getHost(),2177);

...
.
..
.
.
..
}

server side:-
s= new ServerSocket(portNo);// opening a server socket
while(true)// loop for continuously listening a client socket request
{
soc4client= s.accept();
clientThreads.add(new ServerListener(this,soc4client));
}
}

Here i have verified that server socket is created successfully , the client request goes from same etwork but not from cybercafe.

   <<Less

Re: Unable to create a socket connection through internet in an applet chat programe.

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, May 12, 2003 06:35 AM

Firewall?

About | Sitemap | Contact