Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

UDPSocket Class Reference

#include <UDPSocket.h>

Inheritance diagram for UDPSocket:

Socket List of all members.

Public Member Functions

void Open (int fd=0)
void Send (const DCDT_Msg *msg)
 Send the message msg to the remote end of the connection.
void SendHS (int addr, short port, HSMsgHeader *header, void *payload)
 Send an handshake message to addr:port ( normally a multicast address ).
void Send (DCDT_Msg *msg, const char *dest, short port)
 Send the message msg to the specified address ( addr:port ).
void Send (DCDT_Msg *msg, int addr, short port)
DCDT_MsgReceive ()
 Receive a message.
void ReceiveHS (HSMsgHeader *&header, void *&payload)
 Receive a system message.
void MC_Set (int group, int ifaddr)
 Associate us to the multicast group group of the interface ifaddr.

Private Attributes

int multi_addr
short multi_port

Member Function Documentation

void UDPSocket::MC_Set int  group,
int  ifaddr
[inline]
 

Associate us to the multicast group group of the interface ifaddr.

Exceptions:
ChannelError 

Definition at line 505 of file UDPSocket.h.

References DCDT_TRC_COMM, multi_addr, and TRC_PRINT.

Referenced by DCDT_Channel_IP::DynamicPrepare().

void UDPSocket::Open int  fd = 0  )  [inline, virtual]
 

Implements Socket.

Definition at line 49 of file UDPSocket.h.

References DCDT_TRC_COMM, and TRC_PRINT.

Referenced by DCDT_Channel_IP::DynamicPrepare(), DCDT_Channel_IP::Open(), DCDT_Channel_IP::Reopen(), and DCDT_Channel_IP::StaticPrepare().

DCDT_Msg * UDPSocket::Receive  )  [inline, virtual]
 

Receive a message.

Timers precedence: unlocking, receive, lost.

Exceptions:
ConnError 
Returns:
NULL - No message received

!=NULL -

Implements Socket.

Definition at line 345 of file UDPSocket.h.

References DCDT_MsgHeader, DCDT_TRC_COMM, MAX_PAYLOAD_LEN, MSGHEADER_LEN, DCDT_Msg::ReadPayloadLen(), DCDT_Msg::SetPayload(), and TRC_PRINT.

Referenced by DCDT_Channel_IP::Receive().

void UDPSocket::ReceiveHS HSMsgHeader *&  header,
void *&  payload
[inline]
 

Receive a system message.

Look only at receive timer. The calling procedure must ensure that there is enought room for the received message header and payload.

Exceptions:
ConnError 
Timeout No message received

Definition at line 432 of file UDPSocket.h.

References DCDT_TRC_COMM, HSMsgHeader, HSMSGHEADER_LEN, MAX_HSPAYLOAD_LEN, _HSMsgHeader::payload_len, and TRC_PRINT.

Referenced by DCDT_Channel_IP::ReceiveHS().

void UDPSocket::Send DCDT_Msg msg,
int  addr,
short  port
[inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 272 of file UDPSocket.h.

References DCDT_TRC_COMM, DCDT_Msg::GetHeader(), DCDT_Msg::GetPayload(), MSGHEADER_LEN, DCDT_Msg::ReadPayloadLen(), and TRC_PRINT.

void UDPSocket::Send DCDT_Msg msg,
const char *  addr,
short  port
[inline]
 

Send the message msg to the specified address ( addr:port ).

Timers precedence: unblock, send, lost.

Exceptions:
TimeOut 
ConnError 
ChannelError 

Definition at line 204 of file UDPSocket.h.

References DCDT_TRC_COMM, DCDT_Msg::GetHeader(), DCDT_Msg::GetPayload(), MSGHEADER_LEN, DCDT_Msg::ReadPayloadLen(), and TRC_PRINT.

void UDPSocket::Send const DCDT_Msg msg  )  [inline, virtual]
 

Send the message msg to the remote end of the connection.

Exceptions:
TimeOut 
ConnError 

Implements Socket.

Definition at line 66 of file UDPSocket.h.

References DCDT_TRC_COMM, DCDT_Msg::GetHeader(), DCDT_Msg::GetPayload(), MSGHEADER_LEN, DCDT_Msg::ReadPayloadLen(), and TRC_PRINT.

Referenced by DCDT_Channel_IP::Open(), DCDT_Channel_IP::Reopen(), and DCDT_Channel_IP::Send().

void UDPSocket::SendHS int  addr,
short  port,
HSMsgHeader header,
void *  payload
[inline]
 

Send an handshake message to addr:port ( normally a multicast address ).

Exceptions:
TimeOut 
ConnError 

Definition at line 131 of file UDPSocket.h.

References DCDT_TRC_COMM, HSMsgHeader, _HSMsgHeader::payload_len, and TRC_PRINT.

Referenced by DCDT_Channel_IP::SendAnswer(), and DCDT_Channel_IP::SendNotify().


Member Data Documentation

int UDPSocket::multi_addr [private]
 

Definition at line 44 of file UDPSocket.h.

Referenced by MC_Set().

short UDPSocket::multi_port [private]
 

Definition at line 45 of file UDPSocket.h.


The documentation for this class was generated from the following file:
Generated on Sun Jun 19 10:35:52 2005 for dcdt by  doxygen 1.3.9.1