I am writing an application which uses socket connection.
I am able to establish a connection and can able to send the data.
But I am unable to read the data.
I am using eclipse 3.1 + carbide J1.5, S60 3rd edition FP1.
I don't understand why I am not able to read the data.
Here is my sample code.
SocketConnection sc = (SocketConnection)Connector.open(url);
InputStream is = sc.openInputStream();
OutputStream os = sc.openOutputStream();
int availableData = is.available();
System.out.println("data is not available.");
System.out.println("data is available:"+availableData);
while (((c = is.read()) != '\n') && (c != -1))
I am getting is.avaible as 0 in j2me.
But when I tried the same code in normal java program I am getting some value and able to read the incoming data.
Do I need to do any settings for the S60 emulator???
Am I missing anything??
Please help me.