I am using something on an incredible radio network (which is very basic to move messages back and forth) Using Java Socket Programming Between End Nodes
Setup is as follows:
Node A --- relay node --- node B
One problem I'm constantly running is that in some way The connection does not go out, nor does the node A or B know that the link is dead, and still the data continues to circulate. TCP connection is not a time schedule. I have added a heartbeat message that ends a time after some time, but I still want to know why TCP is not the time. Setting up a socket:
channel.socket (). SetKeepAlive (wrong); Channel.socket () setTrafficClass (0x08). // For maximum throughput,
This behavior is weird because it is completely different than my wired network. On the wired network, I can simulate a disconnected connection by dragging the ethernet cord, however, once I get back the cord, the connection is reconfigured and the message starts again.
On the radio network, the connection is never restored and once it dies quietly, the message does not start again.
Is there any other unknown Java setting or setting for a socket that I can use, I also see this behavior in the first place? And yes, before anyone says anything, I know that TCP is not a prepaid option on an incredible network, but in this case I did not want to guarantee any packet damage.
The TCP protocol was designed to be silent. RFC does not require heartbeat continuously compared to two hours. Unless you have control over the system, to change the default 2-hour beats (sometimes, it requires kernel reconstruction), you need to add heartbeat to your own app.
If you send heartbeats, then it still depends on the RTT, which has to wait periodically from retransm, on a high-latency network, timeout can be very high But it should be within minutes.
You can get notifications on the local network because the system can detect the link-down status and leave all connections on that network.
In BTW, you want to set Keepalive to false instead of TRUE. With Keepalive, you get at least a slow heartbeat.
Comments
Post a Comment