FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy > Class Template Reference
[Wire Protocol]

Host class for FountainWireProt policy classes. More...

#include <FountainWireProt.h>

List of all members.

Public Member Functions

bool CheckForData (int sleepTime=0)
 Check if data is ready to be read on the socket.
int sendMessage (ST msg)
 Send a message.
RT recvMessage ()
 Receive a message.
int forwardMessage (RT msg)
 Forward a message.

Protected Member Functions

 FountainWireProtImpl (typename CT::PointerType connection)
 Constructor.
 ~FountainWireProtImpl ()
 Destructor.
void lookupHostname ()
 lookup the name of the remote host this socket is connected to

Protected Attributes

CT connection_
 The underlying wire protocol connection as prescribed by our Connection Policy.

Private Types

typedef ConnectionPolicy::type CT
 The ConnectionType as prescribed by the Connection Policy.
typedef SendPolicy::type ST
 The SendType as prescribed by the Sender Policy.
typedef ReceivePolicy::type RT
 The ReceiveType as prescribed by the Receiver Policy.
typedef HostnamePolicy< ConnectionPolicy > HP
 The Hostname Policy.


Detailed Description

template<class ConnectionPolicy = SSSWireProtConnectionPolicy, class SendPolicy = FountainMessagePtrSendPolicy, class ReceivePolicy = ConstParseMsgPtrReceivePolicy, template< class > class HostnamePolicy = LookupHostname>
class FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy >

Host class for FountainWireProt policy classes.


Member Function Documentation

template<class ConnectionPolicy = SSSWireProtConnectionPolicy, class SendPolicy = FountainMessagePtrSendPolicy, class ReceivePolicy = ConstParseMsgPtrReceivePolicy, template< class > class HostnamePolicy = LookupHostname>
bool FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy >::CheckForData int  sleepTime = 0  )  [inline]
 

Check if data is ready to be read on the socket.

Parameters:
[in] sleepTime The time in seconds to wait for data on this connection
Return values:
bool true if data is waiting, false otherwise

template<class ConnectionPolicy = SSSWireProtConnectionPolicy, class SendPolicy = FountainMessagePtrSendPolicy, class ReceivePolicy = ConstParseMsgPtrReceivePolicy, template< class > class HostnamePolicy = LookupHostname>
int FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy >::forwardMessage RT  msg  )  [inline]
 

Forward a message.

Parameters:
[in] msg The message to forward
Return values:
int SUCCESS if the message was sent, FAILURE otherwise
Todo:
Implicit conversion to const ParseMsg* does not work here for some reason. sjm 3-1-2006

template<class ConnectionPolicy = SSSWireProtConnectionPolicy, class SendPolicy = FountainMessagePtrSendPolicy, class ReceivePolicy = ConstParseMsgPtrReceivePolicy, template< class > class HostnamePolicy = LookupHostname>
RT FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy >::recvMessage  )  [inline]
 

Receive a message.

Returns:
The received message, NULL if no message was received

template<class ConnectionPolicy = SSSWireProtConnectionPolicy, class SendPolicy = FountainMessagePtrSendPolicy, class ReceivePolicy = ConstParseMsgPtrReceivePolicy, template< class > class HostnamePolicy = LookupHostname>
int FountainWireProtImpl< ConnectionPolicy, SendPolicy, ReceivePolicy, HostnamePolicy >::sendMessage ST  msg  )  [inline]
 

Send a message.

Parameters:
[in] msg The message to send
Return values:
int SUCCESS if the message was sent, FAILURE otherwise


The documentation for this class was generated from the following file:
Generated on Wed Mar 8 14:43:33 2006 for Fountain by  doxygen 1.4.6