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

Method GetPeerAddress

system/net/socket.cpp:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106bool Socket::GetPeerAddress(SocketAddress* address) const
107{
108 socklen_t length = address->Capacity();
109 if (CheckError(getpeername(m_handle, address->Address(), &length), "GetPeerAddress"))
110 {
111 address->SetLength(length);
112 return true;
113 }
114 return false;
115}
116
117bool Socket::SetLinger(bool onoff, int timeout)
118{

Callers 1

IoThreadMethod · 0.80

Calls 3

AddressMethod · 0.80
CapacityMethod · 0.45
SetLengthMethod · 0.45

Tested by 1

IoThreadMethod · 0.64