Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

RemoteEvents Class Reference

#include <RemoteEvents.h>

Inheritance diagram for RemoteEvents:

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.

List of all members.

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 5 of file RemoteEvents.cc.

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

Definition at line 10 of file RemoteEvents.cc.

RemoteEvents::RemoteEvents ( RemoteEvents  )  [protected]

Member Function Documentation

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

Definition at line 55 of file RemoteEvents.cc.

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

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

Definition at line 37 of file RemoteEvents.cc.

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

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

Definition at line 25 of file RemoteEvents.cc.

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

int RemoteEvents::remoteIPInt (  ) 

Returns the remote IP address as an int.

Definition at line 18 of file RemoteEvents.cc.

Referenced by remoteIPString().

std::string RemoteEvents::remoteIPString (  ) 

Returns the remote IP address as a string.

Definition at line 14 of file RemoteEvents.cc.

Referenced by EventProxy::handleRemoteRequest().


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 v5.1CVS
Generated Mon May 9 04:59:15 2016 by Doxygen 1.6.3