ArNetPacketReceiverUdp Class Reference

#include <ArNetPacketReceiverUdp.h>

List of all members.


Detailed Description

This is the receiver for UDP packets.


Public Member Functions

 ArNetPacketReceiverUdp ()
ArFunctor2< ArNetPacket *,
struct sockaddr_in * > * 
getProcessPacketCB (void)
 Gets the callback used when a packet is received.
ArSocketgetSocket (void)
 Gets the socket this receiver uses.
bool readData (void)
 Reads in all the data available calling the processPacketCB.
void setProcessPacketCB (ArFunctor2< ArNetPacket *, struct sockaddr_in * > *functor)
 Sets the callback for use when a packet is received.
void setSocket (ArSocket *socket)
 Sets the socket this receiver uses.
 ~ArNetPacketReceiverUdp ()

Protected Attributes

char myBuff [ArNetPacket::MAX_LENGTH+20]
ArTime myLastPacket
ArNetPacket myPacket
ArFunctor2< ArNetPacket *,
struct sockaddr_in * > * 
myProcessPacketCB
ArSocketmySocket


Constructor & Destructor Documentation

ArNetPacketReceiverUdp::ArNetPacketReceiverUdp (  ) 

ArNetPacketReceiverUdp::~ArNetPacketReceiverUdp (  ) 


Member Function Documentation

ArFunctor2< ArNetPacket *, struct sockaddr_in * > * ArNetPacketReceiverUdp::getProcessPacketCB ( void   ) 

Gets the callback used when a packet is received.

Returns:
the callback used when a packet needs to be processed

ArSocket * ArNetPacketReceiverUdp::getSocket ( void   ) 

Gets the socket this receiver uses.

bool ArNetPacketReceiverUdp::readData ( void   ) 

Reads in all the data available calling the processPacketCB.

void ArNetPacketReceiverUdp::setProcessPacketCB ( ArFunctor2< ArNetPacket *, struct sockaddr_in * > *  functor  ) 

Sets the callback for use when a packet is received.

Parameters:
functor the callback to use when a packet needs to be processed

void ArNetPacketReceiverUdp::setSocket ( ArSocket socket  ) 

Sets the socket this receiver uses.

Parameters:
socket the socket to use for receiving data


Member Data Documentation

char ArNetPacketReceiverUdp::myBuff[ArNetPacket::MAX_LENGTH+20] [protected]

ArTime ArNetPacketReceiverUdp::myLastPacket [protected]

ArNetPacket ArNetPacketReceiverUdp::myPacket [protected]

ArFunctor2<ArNetPacket *, struct sockaddr_in *>* ArNetPacketReceiverUdp::myProcessPacketCB [protected]

ArSocket* ArNetPacketReceiverUdp::mySocket [protected]


The documentation for this class was generated from the following files:
Generated on Fri Jul 31 12:37:29 2009 for ArNetworking by  doxygen 1.4.7