Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

string Socket::getLocalAddress (  )  throw (SocketException)

Get the local address.

Returns:
local address of socket
Exceptions:
SocketException thrown if fetch fails

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 }


Generated on Fri Mar 19 10:32:31 2010 for ImpalaSrc by  doxygen 1.5.1