R
rajatag
Hi,
Here's a strange problem I'm facing:
1. I am connecting to a server as follows:
=======
Socket socket = null;
PrintWriter output;
socket = new Socket(server, port);
output = new PrintWriter(socket.getOutputStream(), true);
=======
2. To write data to the socket, I use the following:
=======
public boolean SendRequest(String req) {
try {
output.println(req);
// auto flush is already enabled when creating
PrintWriter so not required here.
System.out.println(req);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
=======
I am writing data to the socket at regular intervals of 15 minutes.
After sometime, the data does not get written to the socket any more
EVEN THOUGH it does appear in the System.out.println() line just after
the output.println() line.
It's a very odd problem and hope someone can help me through with
this.
Thanks!
Rajat
Here's a strange problem I'm facing:
1. I am connecting to a server as follows:
=======
Socket socket = null;
PrintWriter output;
socket = new Socket(server, port);
output = new PrintWriter(socket.getOutputStream(), true);
=======
2. To write data to the socket, I use the following:
=======
public boolean SendRequest(String req) {
try {
output.println(req);
// auto flush is already enabled when creating
PrintWriter so not required here.
System.out.println(req);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
}
=======
I am writing data to the socket at regular intervals of 15 minutes.
After sometime, the data does not get written to the socket any more
EVEN THOUGH it does appear in the System.out.println() line just after
the output.println() line.
It's a very odd problem and hope someone can help me through with
this.
Thanks!
Rajat