00001 // -*- C++ -*- 00002 // 00003 // $Id: SOCK_Dgram_Bcast.inl 69051 2005-10-28 16:14:56Z ossama $ 00004 00005 #include "ace/OS_NS_sys_socket.h" 00006 00007 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00008 00009 ACE_INLINE 00010 ACE_Bcast_Node::~ACE_Bcast_Node (void) 00011 { 00012 } 00013 00014 ACE_INLINE 00015 ACE_SOCK_Dgram_Bcast::~ACE_SOCK_Dgram_Bcast (void) 00016 { 00017 ACE_TRACE ("ACE_SOCK_Dgram_Bcast::~ACE_SOCK_Dgram_Bcast"); 00018 } 00019 00020 // Broadcast an N byte datagram to ADDR (note that addr must be 00021 // preassigned to the broadcast address of the subnet...) 00022 00023 ACE_INLINE ssize_t 00024 ACE_SOCK_Dgram_Bcast::send (const void *buf, 00025 size_t n, 00026 const ACE_Addr &addr, 00027 int flags) const 00028 { 00029 ACE_TRACE ("ACE_SOCK_Dgram_Bcast::send"); 00030 00031 sockaddr *saddr = (sockaddr *) addr.get_addr (); 00032 int len = addr.get_size (); 00033 return ACE_OS::sendto (this->get_handle (), (const char *) buf, n, flags, 00034 (struct sockaddr *) saddr, len); 00035 } 00036 00037 ACE_END_VERSIONED_NAMESPACE_DECL