I am using a Server and a client program to communicate using sockets.Whenever I write data to a BufferedOutputStream in the server it never appears at the client .Flushing the bufferedoutputStream dosen't work. I get data at the client only if i use a big loop to continuosly write to the bufferedoutputstream.
Sorry dear, i am not able to ans. ur question. but ur display name is not according to naming policy of javaranch. so visit the foolowing link naming policy and also u r no allowed to post multiple thread of same ques. so pls. correct ur display name. well u will get a mail from moderaters of this forum also.
Hi Sanjeev, Note that your display name is a violation of the naming policy as well! You need both first and last names, with a space between. Otherwise, thanks for pitching in! See you around the Ranch!
Using PrintWriter instead on BufferedOutputStream and the println method instead of write works very well but the autoflush option must be enabled while creating a PrintWriter Object. Also using print (instead of println) dosen't work because println inserts a line separator string ( "/n" : system dependant) at the end of user entered string which is required for autoflushing