Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

vpr::SocketDatagramOpt Class Reference

Options for datagram sockets. More...

#include <SocketDatagramOpt.h>

Inheritance diagram for vpr::SocketDatagramOpt:

Inheritance graph
[legend]
Collaboration diagram for vpr::SocketDatagramOpt:

Collaboration graph
[legend]
List of all members.

Public Methods

 SocketDatagramOpt (void)
 Default constructor. More...

virtual ~SocketDatagramOpt (void)
 Default destructor. More...

vpr::ReturnStatus getMcastInterface (vpr::InetAddr &mcast_if)
 Gets the multicast interface for this datagram socket. More...

vpr::ReturnStatus setMcastInterface (const vpr::InetAddr &mcast_if)
 Sets the multicast interface for this datagram socket. More...

vpr::ReturnStatus getMcastTimeToLive (vpr::Uint8 &ttl)
 Gets the multicast time-to-live parameter for packets sent on this socket. More...

vpr::ReturnStatus setMcastTimeToLive (const vpr::Uint8 ttl)
 Sets the multicast time-to-live parameter for packets sent on this socket. More...

vpr::ReturnStatus getMcastLoopback (vpr::Uint8 &loop)
vpr::ReturnStatus setMcastLoopback (const vpr::Uint8 loop)
vpr::ReturnStatus addMcastMember (const vpr::McastReq &request)
vpr::ReturnStatus dropMcastMember (const vpr::McastReq &request)

Detailed Description

Options for datagram sockets.

Definition at line 60 of file SocketDatagramOpt.h.


Constructor & Destructor Documentation

vpr::SocketDatagramOpt::SocketDatagramOpt void   
 

Default constructor.

This does nothing and exists only so that we can build a DLL on Win32.

Definition at line 50 of file SocketDatagramOpt.cpp.

00051 {
00052    /* Do nothing. */ ;
00053 }

vpr::SocketDatagramOpt::~SocketDatagramOpt void    [virtual]
 

Default destructor.

This does nothing and exists only so that we can build a DLL on Win32.

Definition at line 55 of file SocketDatagramOpt.cpp.

00056 {
00057    /* Do nothing. */ ;
00058 }


Member Function Documentation

vpr::ReturnStatus vpr::SocketDatagramOpt::getMcastInterface vpr::InetAddr   mcast_if [inline]
 

Gets the multicast interface for this datagram socket.

Definition at line 78 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_if, and vpr::ReturnStatus::success.

00079    {
00080       vpr::SocketOptions::Data option;
00081       vpr::ReturnStatus retval;
00082 
00083       retval = getOption(SocketOptions::McastInterface, option);
00084 
00085       if ( retval.success() )
00086       {
00087          mcast_if = option.mcast_if;
00088       }
00089 
00090       return retval;
00091    }

vpr::ReturnStatus vpr::SocketDatagramOpt::setMcastInterface const vpr::InetAddr   mcast_if [inline]
 

Sets the multicast interface for this datagram socket.

Definition at line 96 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_if.

00097    {
00098       vpr::SocketOptions::Data option;
00099       option.mcast_if = mcast_if;
00100       return setOption(SocketOptions::McastInterface, option);
00101    }

vpr::ReturnStatus vpr::SocketDatagramOpt::getMcastTimeToLive vpr::Uint8   ttl [inline]
 

Gets the multicast time-to-live parameter for packets sent on this socket.

Definition at line 107 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_ttl, and vpr::ReturnStatus::success.

00108    {
00109       vpr::SocketOptions::Data option;
00110       vpr::ReturnStatus retval;
00111 
00112       retval = getOption(SocketOptions::McastTimeToLive, option);
00113 
00114       if ( retval.success() )
00115       {
00116          ttl = option.mcast_ttl;
00117       }
00118 
00119       return retval;
00120    }

vpr::ReturnStatus vpr::SocketDatagramOpt::setMcastTimeToLive const vpr::Uint8    ttl [inline]
 

Sets the multicast time-to-live parameter for packets sent on this socket.

Definition at line 126 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_ttl.

00127    {
00128       vpr::SocketOptions::Data option;
00129       option.mcast_ttl = ttl;
00130       return setOption(SocketOptions::McastTimeToLive, option);
00131    }

vpr::ReturnStatus vpr::SocketDatagramOpt::getMcastLoopback vpr::Uint8   loop [inline]
 

Definition at line 136 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_loopback, and vpr::ReturnStatus::success.

00137    {
00138       vpr::SocketOptions::Data option;
00139       vpr::ReturnStatus retval;
00140 
00141       retval = getOption(SocketOptions::McastLoopback, option);
00142 
00143       if ( retval.success() )
00144       {
00145          loop = option.mcast_loopback;
00146       }
00147 
00148       return retval;
00149    }

vpr::ReturnStatus vpr::SocketDatagramOpt::setMcastLoopback const vpr::Uint8    loop [inline]
 

Definition at line 154 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_loopback.

00155    {
00156       vpr::SocketOptions::Data option;
00157       option.mcast_loopback = loop;
00158       return setOption(SocketOptions::McastLoopback, option);
00159    }

vpr::ReturnStatus vpr::SocketDatagramOpt::addMcastMember const vpr::McastReq   request [inline]
 

Definition at line 164 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_add_member.

00165    {
00166       vpr::SocketOptions::Data option;
00167       option.mcast_add_member = request;
00168       return setOption(SocketOptions::AddMember, option);
00169    }

vpr::ReturnStatus vpr::SocketDatagramOpt::dropMcastMember const vpr::McastReq   request [inline]
 

Definition at line 174 of file SocketDatagramOpt.h.

References vpr::SocketOptions::Data::mcast_drop_member.

00175    {
00176       vpr::SocketOptions::Data option;
00177       option.mcast_drop_member = request;
00178       return setOption(SocketOptions::DropMember, option);
00179    }


The documentation for this class was generated from the following files:
Generated on Sun May 2 14:46:55 2004 for VR Juggler Portable Runtime by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002