FakeSocket Class Reference

Define a fake socket used to simulate a client socket. More...

Inherits FSocket.

List of all members.

Public Member Functions

int32_t readBuffer (int8_t *buffer, int32_t maxLen)
 FSocket readBuffer.
int32_t writeBuffer (const int8_t *const buffer, int32_t len)
 FSocket writeBuffer.
void close ()

Static Public Member Functions

static FSocket * createSocket (const StringBuffer &peer, int32_t port)
 FSocket createSocket.
static void setInputSocketBuffer (char *buffer, int len)
 Set the input socket buffer.
static void setOutputSocketBuffer (char *buffer, int len)
 Set the output socket buffer.
static int getOutputSocketBuffer (int8_t *buffer, int maxLen)
 Get the output socket buffer, return the buffer length.
static bool getConnectionClosed ()
static void setConnectionClosed (bool closed)
static void dispose ()

Private Member Functions

bool inputPacketAvailable ()
 Check whether an input package is available.

Static Private Member Functions

static bool outputPacketAvailable ()
 Check whether an output package is available.
static char * createBuffer (char *buffer, int len)
 Create a string buffer.
static void freeBuffer (char *buffer, int len)
 Delete a string buffer.
static void hexDump (char *buf, int len)
 Print the message written in exadecimal code.

Static Private Attributes

static char * input_socket_buffer
 Input/Output buffers.
static int input_socket_buffer_len
static char * output_socket_buffer
static int output_socket_buffer_len
static bool connectionClosed


Detailed Description

Define a fake socket used to simulate a client socket.

It simply responds to the write and read methods, depending on the CTPService state.


Member Function Documentation

static void FakeSocket::hexDump ( char *  buf,
int  len 
) [inline, static, private]

Print the message written in exadecimal code.

Referenced by readBuffer(), and writeBuffer().


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

Generated on Tue Apr 6 13:00:42 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1