| 114 | } |
| 115 | |
| 116 | string Socket::getLocalAddress() throw(SocketException) { |
| 117 | sockaddr_in addr; |
| 118 | unsigned int addr_len = sizeof(addr); |
| 119 | |
| 120 | if (getsockname(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) { |
| 121 | throw SocketException("Fetch of local address failed (getsockname())", true); |
| 122 | } |
| 123 | return inet_ntoa(addr.sin_addr); |
| 124 | } |
| 125 | |
| 126 | unsigned short Socket::getLocalPort() throw(SocketException) { |
| 127 | sockaddr_in addr; |
nothing calls this directly
no test coverage detected