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

Method GetSockAddr

deps/FtpClient/BlockingSocket.cpp:341–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void CBlockingSocket::GetSockAddr(LPSOCKADDR psa) const
342{
343 ASSERT( psa != NULL );
344 ASSERT( m_hSocket!=INVALID_SOCKET );
345
346 // gets the address of the socket at this end
347 socklen_t nLengthAddr = sizeof(SOCKADDR);
348 if( getsockname(m_hSocket, psa, &nLengthAddr)==SOCKET_ERROR )
349 {
350 throw CBlockingSocketException(_T("GetSockName"));
351 }
352}
353
354CSockAddr CBlockingSocket::GetHostByName(const char* pchName, USHORT ushPort /* = 0 */)
355{

Callers 1

Calls 1

Tested by

no test coverage detected