Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

RemoteEvents Class Reference

#include <RemoteEvents.h>

Inheritance diagram for RemoteEvents:

List of all members.


Detailed Description

This class contains the network code common between RemoteRouter and EventProxy. It contains methods for sending and receiving events, state updates, and requests to recieve the former two things.

Definition at line 18 of file RemoteEvents.h.


Public Types

enum  BufferType { Invalid, StateData, EventData, RequestData }
 This is sent in the header of any data sent over the wireless,. More...
enum  RequestType { EventListenerRequest, StateUpdateRequest, RemoveEventListenerRequest, StopStateUpdateRequest }
 This is sent in the header of any requests for remote events. More...

Public Member Functions

bool isConnected ()
 Returns true of the socket is connected.
std::string remoteIPString ()
 Returns the remote IP address as a string.
int remoteIPInt ()
 Returns the remote IP address as an int.

Static Public Attributes

static const int defaultBufferSize = 1024

Protected Member Functions

 RemoteEvents ()
virtual ~RemoteEvents ()
bool readSize (char *&data, int &bytes)
bool readType (char *&data, int &bytes)
bool readData (char *&data, int &bytes)
 RemoteEvents (RemoteEvents &)
RemoteEventsoperator= (const RemoteEvents &)

Protected Attributes

Socketsck
int sizeLeft
std::vector< char > vecbuf
BufferType bufType

Member Enumeration Documentation

This is sent in the header of any data sent over the wireless,.

Enumerator:
Invalid 
StateData 
EventData 
RequestData 

Definition at line 23 of file RemoteEvents.h.

This is sent in the header of any requests for remote events.

Enumerator:
EventListenerRequest 
StateUpdateRequest 
RemoveEventListenerRequest 
StopStateUpdateRequest 

Definition at line 32 of file RemoteEvents.h.


Constructor & Destructor Documentation

RemoteEvents::RemoteEvents (  )  [protected]

Definition at line 4 of file RemoteEvents.cc.

RemoteEvents::~RemoteEvents (  )  [protected, virtual]

Definition at line 9 of file RemoteEvents.cc.

RemoteEvents::RemoteEvents ( RemoteEvents  )  [protected]


Member Function Documentation

bool RemoteEvents::isConnected (  ) 

std::string RemoteEvents::remoteIPString (  ) 

Returns the remote IP address as a string.

Definition at line 13 of file RemoteEvents.cc.

Referenced by EventProxy::handleRemoteRequest().

int RemoteEvents::remoteIPInt (  ) 

Returns the remote IP address as an int.

Definition at line 17 of file RemoteEvents.cc.

Referenced by remoteIPString().

bool RemoteEvents::readSize ( char *&  data,
int &  bytes 
) [protected]

Definition at line 36 of file RemoteEvents.cc.

Referenced by RemoteRouter::processData(), and EventProxy::processData().

bool RemoteEvents::readType ( char *&  data,
int &  bytes 
) [protected]

Definition at line 24 of file RemoteEvents.cc.

Referenced by RemoteRouter::processData(), and EventProxy::processData().

bool RemoteEvents::readData ( char *&  data,
int &  bytes 
) [protected]

Definition at line 54 of file RemoteEvents.cc.

Referenced by RemoteRouter::processData(), and EventProxy::processData().

RemoteEvents& RemoteEvents::operator= ( const RemoteEvents  )  [protected]


Member Data Documentation

const int RemoteEvents::defaultBufferSize = 1024 [static]

Definition at line 49 of file RemoteEvents.h.

Referenced by EventProxy::processEvent().

int RemoteEvents::sizeLeft [protected]

std::vector<char> RemoteEvents::vecbuf [protected]


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

Tekkotsu v4.0
Generated Thu Nov 22 00:58:39 2007 by Doxygen 1.5.4