Reconnecting when unplug/plug cable

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Reconnecting when unplug/plug cable

509 次查看
Glogov_Kolac
Contributor II

Is there a some function which can be used to indicate that the cable is pluged of or on and procedure to refresh or reinit RTCS?

标签 (1)
标记 (1)
0 项奖励
1 回复

343 次查看
CarlFST60L
Senior Contributor II

I actually just came looking for a RTCS_reinitialize procedure / option as once its created it just returns "error already created" and that's it, and once you drop a cable or boot a router or stuff up an external gateway, it never recovers unless you reboot, there are many situations where you have to reboot to get it to work... Basically, how do kill/destroy RTCS so we can restart it and recover 'quickly' from network issues?

 

Here is my code to detect the cable unplug detection / wait which is done after RTCS_Create and before we try to bind, also done when we go to send packets...

 

      for(;;)       {   link = ipcfg_get_link_active(IPCFG_default_enet_device);  if(link) break;  _time_delay(500);      };