We are behind the proxy..we are able to connect to
yahoo and recive messages thru telnet. Part of my java code for receiving email messages thru proxy is as follows.
Socket sock=new Socket("192.1.2.124", 23);
System.out.println("Socket "+sock);
out=new DataOutputStream(sock.getOutputStream());
in=new BufferedReader(new InputStreamReader sock.getInputStream()));
out.writeBytes("telnet 192.1.2.124 110\n");
out.writeBytes("user natesh\r\n");
//+OK Password required for user id.
line=in.readLine();//PROBLEM COMES HERE..NOT ABLE TO READ FROM INPUTSTREAM OF SOCKET
System.out.println(line);
out.writeBytes("pass ********\r\n");
//firewall telnet proxy (Version 3.2) ready:
line=in.readLine();
System.out.println(line);
out.writeBytes("telnet "+keyValue[2]+" 110\n");
System.out.println("writing ok");
The problem is if I run the my java application, the readLine method of inputstream is not working and held up. After the
output stream's writeBytes method, the readLine method
is not executing(or it is not moving to the next statement).So I couldn't get the result from my java application.
Regards
Natesh MS