sockets - java.io OutputStreamWriter.writer blocks when not flushing frequently -


i writing data socket.writer , see if don't flush frequently, writer gets blocked , never gets flush ever. if flush every write, fine. not sure how determine right frequencey of explicit flush

      while ((subqueue.readableelements()) > 0) {         int batchsize = subqueue.getreadableelements(buf, 0, buf.length);         (int = 0; < batchsize; i++) {             tcpstringclient.this.outwriter.write(buf[i].getvalue().tostring());             tcpstringclient.this.outwriter.write(record_delimitor);          }       }       this.outwriter.flush(); 

any highly appreciated

if you're writing socket, block if reading end slower writing end.

flushing has nothing it.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -