Problem with the PrinterWriter.checkError() method.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sri_Harsha
Posted On:   Monday, October 8, 2001 05:31 AM

I have a sender socket which keeps picking up messages from a message queue and keeps sending them to a receiver socket. In the sender socket program, after sending a message, we use the PrintWriters checkError() method to check if the message went successfully. Now, if the receiver socket program is abnormally terminated, checkError() is not giving me the flag immediately, so I'm losing a message. For ex, if there were 3 messages in the message queue and the receiver socket program bombed off after receiving the first message. In the sender program, The checkError() after sending the second message should indicate 'true' but its not. But it is indicating an error for th   More>>

I have a sender socket which keeps picking up messages
from a message queue and keeps sending them to a receiver
socket. In the sender socket program, after sending a
message, we use the PrintWriters checkError() method to check
if the message went successfully. Now, if the receiver socket
program is abnormally terminated, checkError() is not giving
me the flag immediately, so I'm losing a message.

For ex, if there were 3 messages in the message queue and
the receiver socket program bombed off after receiving the first
message. In the sender program, The checkError() after
sending the second message should indicate 'true' but its not.
But it is indicating an error for the third message, so I'm able
to take care of that. In this process, I'm losing 1 message,
when the error occured.

Any other way of knowing if the receiver is dead?

Thanks for the help in advance.

   <<Less
About | Sitemap | Contact