MCPcopy Create free account
hub / github.com/F-Stack/f-stack / GetDestAddr

Method GetDestAddr

adapter/micro_thread/mt_net.cpp:882–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882struct sockaddr_in* CSockLink::GetDestAddr(struct sockaddr_in* addr)
883{
884 CDestLinks* dstlink = (CDestLinks*)_parents;
885 if ((NULL == _parents) || (NULL == addr)) {
886 return NULL;
887 }
888
889 uint32_t ip = 0;
890 uint16_t port = 0;
891 dstlink->GetDestIP(ip, port);
892
893 addr->sin_family = AF_INET;
894 addr->sin_addr.s_addr = ip;
895 addr->sin_port = port;
896
897 return addr;
898}
899
900bool CSockLink::Connect()
901{

Callers 5

ConnectMethod · 0.95
SendCacheUdpMethod · 0.95
FindSessionMethod · 0.95
RemoveTcpKeepConnMethod · 0.45
CacheTcpKeepConnMethod · 0.45

Calls 1

GetDestIPMethod · 0.80

Tested by

no test coverage detected