Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

DummySocket Class Reference

#include <DummySocket.h>

Inheritance diagram for DummySocket:

Inheritance graph
[legend]
List of all members.

Detailed Description

provides a no-op implementation of Socket for disabled operation

This class provides a DummySocket that doesn't really do anything It exists to maintain code readability; while supporting dogs without wireless Of course, since it does nothing, it doesn't need documentation

Definition at line 17 of file DummySocket.h.

Public Member Functions

 DummySocket (int sockn)
 constructor
virtual ~DummySocket ()
 destructor
byte * getWriteBuffer (int)
 returns NULL
void write (int)
 no-op
int read ()
 no-op (returns -1)
byte * getReadBuffer ()
 getReadBuffer is used with blocking read's NOT IMPLEMENTED
void init ()
 no-op (returns NULL) no-op
int setFlushType (FlushType_t)
 no-op
void setTextForward ()
 no-op
void setForward (DummySocket *)
 sets another socket to send data to if this one is not connected
void setVerbosity (int)
 no-op
int write (const byte *, int)
 no-op (returns -1)
int read (byte *, int)
 no-ip (returns -1)
int printf (const char *,...)
 no-op
int vprintf (const char *, va_list)
 no-op
int pprintf (int, const char *,...)
 no-op
void flush ()
 no-op

Friends

class Wireless


Constructor & Destructor Documentation

DummySocket::DummySocket int  sockn  )  [inline]
 

constructor

Definition at line 22 of file DummySocket.h.

virtual DummySocket::~DummySocket  )  [inline, virtual]
 

destructor

Definition at line 24 of file DummySocket.h.


Member Function Documentation

void DummySocket::flush  )  [inline]
 

no-op

Reimplemented from Socket.

Definition at line 40 of file DummySocket.h.

byte* DummySocket::getReadBuffer  )  [inline]
 

getReadBuffer is used with blocking read's NOT IMPLEMENTED

The read(void) and getReadBuffer combo eliminates one buffer copy. You don't need to use getReadBuffer with read(byte*, int)

Blocking read is currently broken - it will be fixed in the next release

Returns:
pointer to the buffer the previous call to blocking read wrote into or NULL if no data was read

Reimplemented from Socket.

Definition at line 29 of file DummySocket.h.

byte* DummySocket::getWriteBuffer int   )  [inline]
 

returns NULL

Reimplemented from Socket.

Definition at line 26 of file DummySocket.h.

void DummySocket::init  )  [inline]
 

no-op (returns NULL) no-op

Reimplemented from Socket.

Definition at line 30 of file DummySocket.h.

int DummySocket::pprintf int  ,
const char *  ,
  ...
[inline]
 

no-op

Reimplemented from Socket.

Definition at line 39 of file DummySocket.h.

int DummySocket::printf const char *  ,
  ...
[inline]
 

no-op

Reimplemented from Socket.

Definition at line 37 of file DummySocket.h.

int DummySocket::read byte *  ,
int 
[inline]
 

no-ip (returns -1)

Reimplemented from Socket.

Definition at line 36 of file DummySocket.h.

int DummySocket::read void   )  [inline]
 

no-op (returns -1)

Reimplemented from Socket.

Definition at line 28 of file DummySocket.h.

int DummySocket::setFlushType FlushType_t   )  [inline]
 

no-op

Reimplemented from Socket.

Definition at line 31 of file DummySocket.h.

void DummySocket::setForward DummySocket  )  [inline]
 

sets another socket to send data to if this one is not connected

Definition at line 33 of file DummySocket.h.

void DummySocket::setTextForward  )  [inline]
 

no-op

Reimplemented from Socket.

Definition at line 32 of file DummySocket.h.

void DummySocket::setVerbosity int   )  [inline]
 

no-op

Reimplemented from Socket.

Definition at line 34 of file DummySocket.h.

int DummySocket::vprintf const char *  ,
va_list 
[inline]
 

no-op

Reimplemented from Socket.

Definition at line 38 of file DummySocket.h.

int DummySocket::write const byte *  ,
int 
[inline]
 

no-op (returns -1)

Reimplemented from Socket.

Definition at line 35 of file DummySocket.h.

void DummySocket::write int   )  [inline]
 

no-op

Reimplemented from Socket.

Definition at line 27 of file DummySocket.h.


Friends And Related Function Documentation

friend class Wireless [friend]
 

Reimplemented from Socket.

Definition at line 18 of file DummySocket.h.


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

Tekkotsu v2.4.1
Generated Tue Aug 16 16:34:59 2005 by Doxygen 1.4.4