java - BufferReader.readline() block PrinterWriter.println() -


after creating socket connection in android app, can't write in buffer after reading.

this example establishing connection server:

//... try{         socket = new socket(ip, port);     out = new  printwriter(new bufferedwriter(             new outputstreamwriter(socket.getoutputstream())), true);     in =new bufferedreader(new inputstreamreader(socket.getinputstream()));     //ask connection     out.println(req1);     //server send me nonce     result=in.readline().tostring();     //encrypting nonce specific alghorithm      passwd=password.get_passwd(result);     //sending password      out.println(passwd); //here out.println doesn't write      //... } catch (ioexception e){     e.printstacktrace(); } {     try {         socket.close();         out.close();         in.close();     } catch (ioexception e) {         e.printstacktrace();     } }    //... 

so can 1 me solving problem. thanks.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -