Hi all:
I am new to NS3 community. Currently I meet a problem, described as following:
The topology is simple
c ------ s1
Node c is a client node, and it connects to Node s1 that is a sink node who receives data from Node c (Similar to the TCP Bulk Send). At some points, s1 go offline. How can node c knows this information and connects to another node s2? I currently use NS3::Socket to connect these two nodes. I suppose changing a remote sink node is easy to do by using the function "connect()". However, I didn't find any callback function triggered by the timeout (as well as retransmission times).
I tried several ways, but none of these are useful. For example, it is not a good idea to use the return value of function "send()", I think it returns -1 when buffer is full, not remote server is down. I don't think I can use ns3::TcpSocketBase, because it cannot trigger the "changing another server" behavior.
Do you have any idea how to solve this problem? I think it is a simple problem, maybe I focused on the wrong Class. If you give some suggestions, could you please give something detail? thanks in advance!!!
Best,
Ding