ACE_QoS 8.0.5
Loading...
Searching...
No Matches
ACE_SOCK_Dgram_Mcast_QoS Class Reference

Defines the member functions for the ACE QoS enabled socket wrapper for UDP/IP multicast. More...

#include <SOCK_Dgram_Mcast_QoS.h>

Inheritance diagram for ACE_SOCK_Dgram_Mcast_QoS:
Collaboration diagram for ACE_SOCK_Dgram_Mcast_QoS:

Public Member Functions

 ACE_SOCK_Dgram_Mcast_QoS (options opts=DEFOPTS)
 Ctor, has same defaults as ACE_SOCK_Dgram_Mcast.
 ~ACE_SOCK_Dgram_Mcast_QoS ()
 Default dtor.
int subscribe (const ACE_INET_Addr &mcast_addr, const ACE_QoS_Params &qos_params, int reuse_addr=1, const ACE_TCHAR *net_if=0, int protocol_family=PF_INET, int protocol=0, ACE_Protocol_Info *protocolinfo=0, ACE_SOCK_GROUP g=0, u_long flags=0, ACE_QoS_Session *qos_session=0)
ssize_t send (const iovec buffers[], int buffer_count, size_t &number_of_bytes_sent, int flags, const ACE_Addr &addr, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
ssize_t send (const void *buf, size_t n, const ACE_Addr &addr, int flags, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
 Send an n byte buf to the datagram socket (uses <WSASentTo>).
ACE_QoS_Manager qos_manager ()
 Returns the QoS manager for this socket.
int open (const ACE_INET_Addr &addr, const ACE_QoS_Params &qos_params, int protocol_family=PF_INET, int protocol=0, ACE_Protocol_Info *protocolinfo=0, ACE_SOCK_GROUP g=0, u_long flags=0, int reuse_addr=0)
Public Member Functions inherited from ACE_SOCK_Dgram_Mcast
 ACE_SOCK_Dgram_Mcast (options opts=DEFOPTS)
 ~ACE_SOCK_Dgram_Mcast ()
int open (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if=0, int reuse_addr=1)
int join (const ACE_INET_Addr &mcast_addr, int reuse_addr=1, const ACE_TCHAR *net_if=0)
int leave (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if=0)
ssize_t send (const void *buf, size_t n, int flags=0) const
ssize_t send (const iovec iov[], int n, int flags=0) const
int set_option (int option, char optval)
void dump () const
void opts (int opts)
int opts () const
Public Member Functions inherited from ACE_SOCK_Dgram
 ACE_SOCK_Dgram ()
 ACE_SOCK_Dgram (const ACE_Addr &local, int protocol_family=ACE_PROTOCOL_FAMILY_INET, int protocol=0, int reuse_addr=0, int ipv6_only=0)
 ACE_SOCK_Dgram (const ACE_Addr &local, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g=0, u_long flags=0, int reuse_addr=0, int ipv6_only=0)
int open (const ACE_Addr &local, int protocol_family=ACE_PROTOCOL_FAMILY_INET, int protocol=0, int reuse_addr=0, int ipv6_only=0)
int open (const ACE_Addr &local, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g=0, u_long flags=0, int reuse_addr=0, int ipv6_only=0)
 ~ACE_SOCK_Dgram ()
ssize_t send (const void *buf, size_t n, const ACE_Addr &addr, int flags=0) const
ssize_t recv (void *buf, size_t n, ACE_Addr &addr, int flags=0) const
ssize_t recv (void *buf, size_t n, ACE_Addr &addr, int flags, const ACE_Time_Value *timeout) const
ssize_t send (const void *buf, size_t n, const ACE_Addr &addr, int flags, const ACE_Time_Value *timeout) const
ssize_t send (const iovec buffers[], int buffer_count, size_t &number_of_bytes_sent, int flags, const ACE_Addr &addr, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
ssize_t recv (iovec buffers[], int buffer_count, size_t &number_of_bytes_recvd, int &flags, ACE_Addr &addr, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
ssize_t send (const void *buf, size_t n, const ACE_Addr &addr, int flags, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
ssize_t recv (void *buf, size_t n, ACE_Addr &addr, int flags, ACE_OVERLAPPED *overlapped, ACE_OVERLAPPED_COMPLETION_FUNC func) const
void dump () const
int set_nic (const ACE_TCHAR *net_if, int addr_family=AF_UNSPEC)
Public Member Functions inherited from ACE_SOCK
int set_option (int level, int option, void *optval, int optlen) const
int get_option (int level, int option, void *optval, int *optlen) const
int close ()
int get_local_addr (ACE_Addr &) const
int get_remote_addr (ACE_Addr &) const
void dump () const
int open (int type, int protocol_family, int protocol, int reuse_addr)
int open (int type, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g, u_long flags, int reuse_addr)
Public Member Functions inherited from ACE_IPC_SAP
int control (int cmd, void *) const
int enable (int value) const
int disable (int value) const
ACE_HANDLE get_handle () const
void set_handle (ACE_HANDLE handle)
void dump () const

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Public Attributes inherited from ACE_SOCK_Dgram_Mcast
 OPT_BINDADDR_NO
 OPT_BINDADDR_YES
 DEFOPT_BINDADDR
 OPT_NULLIFACE_ONE
 OPT_NULLIFACE_ALL
 DEFOPT_NULLIFACE
 DEFOPTS
 ACE_ALLOC_HOOK_DECLARE
Public Attributes inherited from ACE_SOCK_Dgram
 ACE_ALLOC_HOOK_DECLARE
Public Attributes inherited from ACE_SOCK
 ACE_ALLOC_HOOK_DECLARE
Public Attributes inherited from ACE_IPC_SAP
 ACE_ALLOC_HOOK_DECLARE

Private Member Functions

int subscribe_ifs (const ACE_INET_Addr &mcast_addr, const ACE_QoS_Params &qos_params, const ACE_TCHAR *net_if, int protocol_family, int protocol, int reuse_addr, ACE_Protocol_Info *protocolinfo)
 Subscribe to the multicast interface using QoS-enabled semantics.

Private Attributes

ACE_QoS_Manager qos_manager_
 Manages the QoS sessions that this socket subscribes to.

Additional Inherited Members

Public Types inherited from ACE_SOCK_Dgram_Mcast
enum  options
Public Types inherited from ACE_SOCK_Dgram
typedef ACE_INET_Addr PEER_ADDR
Protected Member Functions inherited from ACE_SOCK_Dgram_Mcast
int open_i (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if=0, int reuse_addr=1)
int clear_subs_list ()
Protected Member Functions inherited from ACE_SOCK_Dgram
int shared_open (const ACE_Addr &local, int protocol_family, int ipv6_only=0)
int make_multicast_ifaddr (ip_mreq *mreq, const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if)
int make_multicast_ifaddr6 (ipv6_mreq *mreq, const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if)
Protected Member Functions inherited from ACE_SOCK
 ACE_SOCK (int type, int protocol_family, int protocol=0, int reuse_addr=0)
 ACE_SOCK (int type, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g, u_long flags, int reuse_addr)
 ACE_SOCK ()
 ~ACE_SOCK ()=default
Protected Member Functions inherited from ACE_IPC_SAP
 ACE_IPC_SAP ()
 ~ACE_IPC_SAP ()
Protected Attributes inherited from ACE_SOCK_Dgram_Mcast
ACE_INET_Addr send_addr_
ACE_TCHARsend_net_if_

Detailed Description

Defines the member functions for the ACE QoS enabled socket wrapper for UDP/IP multicast.

Constructor & Destructor Documentation

◆ ACE_SOCK_Dgram_Mcast_QoS()

ACE_SOCK_Dgram_Mcast_QoS::ACE_SOCK_Dgram_Mcast_QoS ( options opts = DEFOPTS)

Ctor, has same defaults as ACE_SOCK_Dgram_Mcast.

◆ ~ACE_SOCK_Dgram_Mcast_QoS()

ACE_SOCK_Dgram_Mcast_QoS::~ACE_SOCK_Dgram_Mcast_QoS ( )
inline

Default dtor.

Member Function Documentation

◆ open()

int ACE_SOCK_Dgram_Mcast_QoS::open ( const ACE_INET_Addr & addr,
const ACE_QoS_Params & qos_params,
int protocol_family = PF_INET,
int protocol = 0,
ACE_Protocol_Info * protocolinfo = 0,
ACE_SOCK_GROUP g = 0,
u_long flags = 0,
int reuse_addr = 0 )

◆ qos_manager()

ACE_QoS_Manager ACE_SOCK_Dgram_Mcast_QoS::qos_manager ( )
inline

Returns the QoS manager for this socket.

◆ send() [1/2]

ssize_t ACE_SOCK_Dgram_Mcast_QoS::send ( const iovec buffers[],
int buffer_count,
size_t & number_of_bytes_sent,
int flags,
const ACE_Addr & addr,
ACE_OVERLAPPED * overlapped,
ACE_OVERLAPPED_COMPLETION_FUNC func ) const
inline

Send <buffer_count> worth of buffers to addr using overlapped I/O (uses <WSASentTo>). Returns 0 on success.

◆ send() [2/2]

ssize_t ACE_SOCK_Dgram_Mcast_QoS::send ( const void * buf,
size_t n,
const ACE_Addr & addr,
int flags,
ACE_OVERLAPPED * overlapped,
ACE_OVERLAPPED_COMPLETION_FUNC func ) const
inline

Send an n byte buf to the datagram socket (uses <WSASentTo>).

◆ subscribe()

int ACE_SOCK_Dgram_Mcast_QoS::subscribe ( const ACE_INET_Addr & mcast_addr,
const ACE_QoS_Params & qos_params,
int reuse_addr = 1,
const ACE_TCHAR * net_if = 0,
int protocol_family = PF_INET,
int protocol = 0,
ACE_Protocol_Info * protocolinfo = 0,
ACE_SOCK_GROUP g = 0,
u_long flags = 0,
ACE_QoS_Session * qos_session = 0 )

This is a QoS-enabled method for joining a multicast group, which passes <qos_params> via <ACE_OS::join_leaf>. The network interface device driver is instructed to accept datagrams with <mcast_addr> multicast addresses. If the socket has already been opened, <subscribe> closes the socket and opens a new socket bound to the <mcast_addr>. The session object specifies the QoS session that the socket wants to subscribe to. A socket may subscribe to multiple QoS sessions by calling this method multiple times with different session objects.

The <net_if> interface is hardware specific, e.g., use "netstat -i" to find whether your interface is, such as "le0" or something else. If net_if == 0, <subscribe> uses the default mcast interface. Returns: -1 if the call fails.

Note that some platforms, such as pSoS, support only number, not names, for network interfaces. For these platforms, just give these numbers in alphanumeric form and <subscribe> will convert them into numbers via <ACE_OS::atoi>.

◆ subscribe_ifs()

int ACE_SOCK_Dgram_Mcast_QoS::subscribe_ifs ( const ACE_INET_Addr & mcast_addr,
const ACE_QoS_Params & qos_params,
const ACE_TCHAR * net_if,
int protocol_family,
int protocol,
int reuse_addr,
ACE_Protocol_Info * protocolinfo )
private

Subscribe to the multicast interface using QoS-enabled semantics.

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

ACE_SOCK_Dgram_Mcast_QoS::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ qos_manager_

ACE_QoS_Manager ACE_SOCK_Dgram_Mcast_QoS::qos_manager_
private

Manages the QoS sessions that this socket subscribes to.


The documentation for this class was generated from the following files: