Get the local address.
Definition at line 113 of file PracticalSocket.cpp. References sockDesc. 00113 { 00114 sockaddr_in addr; 00115 unsigned int addr_len = sizeof(addr); 00116 00117 if (getsockname(sockDesc, (sockaddr *) &addr, (socklen_t *) &addr_len) < 0) { 00118 throw SocketException("Fetch of local address failed (getsockname())", true); 00119 } 00120 return inet_ntoa(addr.sin_addr); 00121 }
|