Posted By:
matthew_magliocca
Posted On:
Wednesday, February 21, 2007 02:36 PM
Hi. I'm trying to use a socket connection to read data being sent to my applet from a Javascript ajax connection. I accept the connection on port blank but then I never get any data. BufferedReader InStr= new BufferedReader(new InputStreamReader(socket.getInputStream())); int bytes_read = InStr.read(buffer, str.length(), len); do{ bytes_read = InStr.read(buffer, str.length(), len); str += bytes_read; }while(bytes_read > 0); The applet says that the connection is being made but for some reason I don't get any data. There must be something wrong with how I try to get it from the sock
More>>
Hi. I'm trying to use a socket connection to read data being sent to my applet from a Javascript ajax connection.
I accept the connection on port blank but then I never get any data.
BufferedReader InStr= new BufferedReader(new InputStreamReader(socket.getInputStream()));
int bytes_read = InStr.read(buffer, str.length(), len);
do{
bytes_read = InStr.read(buffer, str.length(), len);
str += bytes_read;
}while(bytes_read > 0);
The applet says that the connection is being made but for some reason I don't get any data. There must be something wrong with how I try to get it from the socket. Can anyone point out anything obviously wrong with my code?
Thanks
<<Less