Send the given buffer as a UDP datagram to the specified address/port.
Definition at line 327 of file PracticalSocket.cpp. References fillAddr(), and Socket::sockDesc. 00329 { 00330 sockaddr_in destAddr; 00331 fillAddr(foreignAddress, foreignPort, destAddr); 00332 00333 // Write out the whole buffer as a single message. 00334 if (sendto(sockDesc, (raw_type *) buffer, bufferLen, 0, 00335 (sockaddr *) &destAddr, sizeof(destAddr)) != bufferLen) { 00336 throw SocketException("Send failed (sendto())", true); 00337 } 00338 }
Here is the call graph for this function:
|