| 326 | } |
| 327 | |
| 328 | void 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 | |
| 341 | void CBlockingSocket::GetSockAddr(LPSOCKADDR psa) const |
| 342 | { |
nothing calls this directly
no test coverage detected