PDA

View Full Version : ISocket_read() reads on the 1st 2 bytes !!!


compuser1978
03-24-2002, 05:28 PM
I am reading a string from Java server socket. However get only the first 2 bytes of the string that is sent from the server.
I am using ISocket_read(pme, szBuf, 8); cos the string I am receaving is 8 bytes long.
I have used the ISocket_wouldblock.

Please help.
thanks in advance.

Mahesh
03-25-2002, 12:22 PM
Can you try the code that is provided in the FAQ for reading from a socket and see if that works:

http://www.qualcomm.com/brew/developer/support/faq/techfaq7.html#T7F

Thanks,

--Mahesh
BREW Support

compuser1978
03-25-2002, 06:41 PM
THanks for the reply,
I was able to implement the code. The problems that I now have is

1.

the STRLEN does not work.
e.g.
char szBuf[8] = {'R','O','H','I','T','K','L','\0',};
STRLEN(szBuf); returns a 0.

2.
When I issue a ISOCKET_Write(), my Java server does not seem to respond. It responds only after I close the BREW Socket appl'n.

Thanks again