on 11-16-2005 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
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 |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.