summaryrefslogtreecommitdiff
path: root/ace/SOCK_Dgram_Bcast.i
blob: 8029354e2ae0fd9cd2c4ab487efd32358fb00f01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
}