TPProto::Connect Class Reference

Connect Frame class. More...

#include <connect.h>

Inheritance diagram for TPProto::Connect:

TPProto::Frame List of all members.

Public Member Functions

virtual ~Connect ()
 Destructor.
void packBuffer (Buffer *buf)
 Packs the Connect Frame into a buffer.
bool unpackBuffer (Buffer *buf)
 Unpacks data from the buffer.
void setClientString (const std::string &cs)
 Sets the client string.

Detailed Description

Connect Frame class.

This class is the Connect Frame sent when creating a connection to the server. It sends a string to the server in the data. FrameCodec is the preferred way of setting the client string as it also adds the library version.


Member Function Documentation

void TPProto::Connect::packBuffer ( Buffer buf  )  [virtual]

Packs the Connect Frame into a buffer.

This method packs the client string into the buffer and makes sure the type of this frame is set correctly.

Parameters:
buf The Buffer to pack the data into.

Implements TPProto::Frame.

bool TPProto::Connect::unpackBuffer ( Buffer buf  )  [virtual]

Unpacks data from the buffer.

Always returns false because we should never receive one.

Returns:
False always.

Implements TPProto::Frame.

void TPProto::Connect::setClientString ( const std::string &  cs  ) 

Sets the client string.

The client string is sent in the Connect Frame. The perferred method is using the method provided by FrameCodec (which eventually calls this one).

Parameters:
cs The string to be set as the client string.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 07:30:46 2009 for libtpproto-cpp by  doxygen 1.5.1