Hi Kevin,
If detect that the TCP connection has closed or there's an error in response, the milo client will automatically reconnect, reactivate the session, or create a new session. Is this right?
I done a test, closed OPC server, but the client could not detect that the TCP connection had closed,Nothing happened.
If Added funtion for reading the server's Currentime, throw Bad_Timeout exception, then process terminal, but no reconnect/reactiate...
This is the testing result, any more suggestion?
Thanks,
Best regards,
George Ray
------------------------------------------------------------------
发件人:Kevin Herron <kevinherron@xxxxxxxxx>
发送时间:2017年4月25日(星期二) 10:21
收件人:george.ray <george.ray@xxxxxxxxxx>; milo developer discussions <milo-dev@xxxxxxxxxxx>
主 题:Re: [milo-dev] whether there is a heartbeat and reconnection mechanism with milo client
You should implement a heartbeat yourself, if for no other reason than to keep your session alive. This is commonly done by periodically reading the server's CurrentTime and State nodes.
The client will automatically reconnect, reactivate the session, or create a new one if necessary, but this will only happen when its detected that the TCP connection has closed or there's an error in response to one of the service calls.