MCPcopy Create free account
hub / github.com/chen3feng/toft / GetLocalAddress

Method GetLocalAddress

system/net/socket.cpp:95–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94
95bool Socket::GetLocalAddress(SocketAddress* address) const
96{
97 socklen_t length = address->Capacity();
98 if (CheckError(getsockname(m_handle, address->Address(), &length), "GetLocalAddress"))
99 {
100 address->SetLength(length);
101 return true;
102 }
103 return false;
104}
105
106bool Socket::GetPeerAddress(SocketAddress* address) const
107{

Callers 4

BindMethod · 0.80
TESTFunction · 0.80
DatagramSocketTestMethod · 0.80
StreamSocketTestMethod · 0.80

Calls 3

AddressMethod · 0.80
CapacityMethod · 0.45
SetLengthMethod · 0.45

Tested by 3

TESTFunction · 0.64
DatagramSocketTestMethod · 0.64
StreamSocketTestMethod · 0.64