MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / GetPeerAddr

Method GetPeerAddr

deps/FtpClient/BlockingSocket.cpp:328–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void CBlockingSocket::GetPeerAddr(LPSOCKADDR psa) const
329{
330 ASSERT( psa != NULL );
331 ASSERT( m_hSocket!=INVALID_SOCKET );
332
333 // gets the address of the socket at the other end
334 socklen_t nLengthAddr = sizeof(SOCKADDR);
335 if( getpeername(m_hSocket, psa, &nLengthAddr)==SOCKET_ERROR )
336 {
337 throw CBlockingSocketException(_T("GetPeerName"));
338 }
339}
340
341void CBlockingSocket::GetSockAddr(LPSOCKADDR psa) const
342{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected