UDT source code analysis (2) start and end

UDT's startup routine

Startup routine sequence:void UDT::startup() -> void CUDT::startup() -> void CUDTUnited::startup() -> void* CUDTUnited::garbageCollect(void* p) -> void CUDTUnited::checkBrokenSockets() -> void CUDTUnited::removeSocket(const UDTSOCKET u) -> void CUDT::close() -> void CUDT::flush()

  • For a complete UDT SOCKET cleanup six-part:
    • Set the state of CUDT* to BROKEN
    • Call close() in CUDT
    • Update the closing time of UDT SOCKET
    • Set UDT SOCKET to Closed
    • Add the current UDT SOCKET to the Closed Array and process it in the GC thread
    • Remove from global MAP

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325293395&siteId=291194637