View Single Post
  (#1 (permalink)) Old
kanagha kanagha is offline
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2008
Default Doubt in java socket programming - 06-12-2008, 12:57 PM

I am trying to run this simple codepiece

Socket mySock = new Socket("www.javalobby.org",80);
InputStream ins = mySock.getInputStream();
BufferedReader bufr = new BufferedReader(new InputStreamReader(ins));
String aLine = bufr.readLine();

but the program while running, gets hanged at the readLine and never ends. What is the reason?
Reply With Quote