SocketProxy Class Reference

A simple socket proxy that forwards to another socket. More...

#include <SocketProxy.h>

Inheritance diagram for SocketProxy:

Inheritance graph
[legend]
Collaboration diagram for SocketProxy:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SocketProxy (int connectPort, const std::string host="localhost")
 Connect to connectPort on host, start a forwarding thread.
void close ()
 Simulate a network disconnect.
void dropClientData (bool drop=true)
 Simulate lost packets, drop data from client.
void dropServerData (bool drop=true)
 Simulate lost packets, drop data from server.
bool isClosed () const
uint16_t getPort () const


Detailed Description

A simple socket proxy that forwards to another socket.

Used between client & local broker to simulate network failures.


Constructor & Destructor Documentation

SocketProxy::SocketProxy ( int  connectPort,
const std::string  host = "localhost" 
) [inline]

Connect to connectPort on host, start a forwarding thread.

Listen for connection on getPort().


Member Function Documentation

void SocketProxy::close (  )  [inline]

Simulate a network disconnect.


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

Generated on Thu May 15 22:22:09 2008 for Qpid by  doxygen 1.5.5