From a5fdebc5f6375078ec1763850a4ca23ec7fe6458 Mon Sep 17 00:00:00 2001 From: levine Date: Mon, 21 Oct 1996 21:41:34 +0000 Subject: Initial revision --- ace/SOCK_Dgram_Bcast.i | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ace/SOCK_Dgram_Bcast.i (limited to 'ace/SOCK_Dgram_Bcast.i') diff --git a/ace/SOCK_Dgram_Bcast.i b/ace/SOCK_Dgram_Bcast.i new file mode 100644 index 00000000000..8029354e2ae --- /dev/null +++ b/ace/SOCK_Dgram_Bcast.i @@ -0,0 +1,23 @@ +/* -*- C++ -*- */ +// $Id$ + +// SOCK_Dgram_Bcast.i + +// Broadcast an N byte datagram to ADDR (note that addr must be +// preassigned to the broadcast address of the subnet...) + +inline ssize_t +ACE_SOCK_Dgram_Bcast::send (const void *buf, + size_t n, + const ACE_Addr &addr, + int flags) const +{ + ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send"); + + sockaddr *saddr = (sockaddr *) addr.get_addr (); + size_t len = addr.get_size (); + return ACE_OS::sendto (this->get_handle (), (const char *) buf, n, flags, + (struct sockaddr *) saddr, len); +} + + -- cgit v1.2.1