Skip to Content
0
Former Member
Nov 16, 2005 at 04:51 PM

Connection reset by peer: socket write error

259 Views

hi,

i get this error message when i use the out.write() command in my program after the loop is run one time. the second time it throws the Exception "Connection reset by peer: socket write error"

for(;;)
  {
  BufferedWriter out = null; 
  out=new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
  lesen=new BufferedReader(new InputStreamReader(System.in));
  t=lesen.readLine();
  out.write(t); 
  out.newLine(); 
  out.flush();
  out.close(); 
  }

thx and bye,

benjamin