on ‎2005 Nov 16 4:51 PM
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
Request clarification before answering.
Try to not to close the output stream .
You have to close it in the end of comunication
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.