can any body help me on socket
programming/ multithreading. i'm creating a program that accepts
connection and data from a palmpilot tungsten. i had difficulty in
receiving the data. i first use the
in = new BufferedReader(new InputStreamReader(socket.getInputStream
()));
but nothing happens.
then i use
is = new DataInputStream(clientSocket.getInputStream());
then i finally got the data from the palm pilot. but one problem is
that.....
String john;
while ((john = is.readLine()) != null) {
System.out.println("Server: " + john);
if (john.indexOf(john) != -1) {
break;
}
}
System.out.println("start if" + john);
if (john.equals("name")){
System.out.println("query"+john);
}
else{
System.out.println("nothing");
}
in the line if(john.equals("name"))...
the output is "nothing" meaning, there is no data in john.
can any body help me? thanks a lot.......