| 339 | } |
| 340 | |
| 341 | void 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 | |
| 354 | CSockAddr CBlockingSocket::GetHostByName(const char* pchName, USHORT ushPort /* = 0 */) |
| 355 | { |
no test coverage detected