Set the local port to the specified port and the local address to the specified address. If you omit the port, a random port will be selected.
Definition at line 146 of file PracticalSocket.cpp. References fillAddr(). 00147 { 00148 // Get the address of the requested host 00149 sockaddr_in localAddr; 00150 fillAddr(localAddress, localPort, localAddr); 00151 00152 if (bind(sockDesc, (sockaddr *) &localAddr, sizeof(sockaddr_in)) < 0) { 00153 throw SocketException("Set of local address and port failed (bind())", true); 00154 } 00155 }
Here is the call graph for this function:
|