Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MCCLSocket Class Reference

Base class for connecion-less sockets. More...

#include <mcllib/MCSocket.h>

Inheritance diagram for MCCLSocket:

MCSocket MCIOBase MCBase MCUDPSocket List of all members.

Public Member Functions

void addMulticast (const MCNetAddr &group, const MCNetAddr &mcastIf)
 Join a multicast group.
void dropMulticast (const MCNetAddr &group, const MCNetAddr &mcastIf)
 Leave a multicast group.
bool getBroadcast () const
 Determine if broadcast is allowed on the socket.
MCNetAddr getMulticastIf () const
 Get the multicast interface address.
mcuint32 getMulticastTtl () const
 Determine the multicast time to live of the socket.
void setBroadcast (bool broadcast)
 Control whether broadcast is allowed on the socket.
void setMulticastIf (const MCNetAddr &mcastIf)
 Set the multicast interface address.
void setMulticastTtl (mcuint32 mcastTtl)
 Set the multicast time to live.

Protected Member Functions

 MCCLSocket (void *impl)
 Construct from an implementation.
 MCCLSocket ()
 Default constructor for use by derived classes.

Detailed Description

Base class for connecion-less sockets.

Connection-less sockets do not have a permanent peer to which they are connected. Instead, each time data is sent, the address to send to must be specified. Similarly, each time data is received, it is possible (although not mandatory) to obtain the address of the remote peer which sent the data (see recvFrom()).

Due to their connection-less nature, these sockets support broadcast (where data is sent to all remote addresses in a "broadcast domain" simultaneously, using a special broadcast address) and multicast (where data is sent to participating remote addresses in a "multicast group" simultaneously, using a special multicast address).


Constructor & Destructor Documentation

MCCLSocket void *  impl  )  [protected]
 

Construct from an implementation.

The implementation object must be derived from MCCLSockBaseImpl


Member Function Documentation

void addMulticast const MCNetAddr group,
const MCNetAddr mcastIf
 

Join a multicast group.

Parameters:
group the multicast group to join
mcastIf the multicast interface address

void dropMulticast const MCNetAddr group,
const MCNetAddr mcastIf
 

Leave a multicast group.

Parameters:
group the multicast group to leave
mcastIf the multicast interface address

bool getBroadcast  )  const
 

Determine if broadcast is allowed on the socket.

Returns:
true if broadcast is allowed on the socket

MCNetAddr getMulticastIf  )  const
 

Get the multicast interface address.

Returns:
an MCNetAddr representing the multicast interface address

mcuint32 getMulticastTtl  )  const
 

Determine the multicast time to live of the socket.

Returns:
the mutlticast time to live of the socket

void setBroadcast bool  broadcast  ) 
 

Control whether broadcast is allowed on the socket.

Parameters:
broadcast if true then broadcast is allowed

void setMulticastIf const MCNetAddr mcastIf  ) 
 

Set the multicast interface address.

Parameters:
mcastIf the new multicast interface address

void setMulticastTtl mcuint32  mcastTtl  ) 
 

Set the multicast time to live.

Parameters:
mcastTtl the mutlicast time to live


Generated on Wed Jan 12 19:05:49 2005 for MCLLIB by  doxygen 1.3.9.1