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

Method GetHostByAddr

deps/FtpClient/BlockingSocket.cpp:372–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372const char* CBlockingSocket::GetHostByAddr(LPCSOCKADDR psa)
373{
374 ASSERT( psa != NULL );
375 hostent* pHostEnt = gethostbyaddr((char*) &((LPSOCKADDR_IN) psa)
376 ->sin_addr.s_addr, 4, PF_INET);
377
378 if( pHostEnt==NULL )
379 {
380 throw CBlockingSocketException(_T("GetHostByAddr"));
381 }
382
383 return pHostEnt->h_name; // caller shouldn't delete this memory
384}
385
386///////////////////////////////////////////////////////////////////////////////////////
387//**************************** Class CHttpBlockingSocket ****************************//

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected