The socket inputstream functions read(byte b) and read(byte b, int offset, int len) functions should return after reading few bytes whenever they are available.
***Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer. ***
But when I run this app on Nokia 6600, the app gets hang. Basically its get blocked on read() as am passing a big buffer. Then I realized it doesn't return until len bytes are read or buffer if full. So if I don't know the len of message to be read, I have to read byte by byte which consumes too much processor time.
Anybody realized/faced this problem? I couldn't run it on any other device as my App uses MIDP2.0 APIs.
Any idea what's going wrong?