ESA JPIP server  0.1
net::SocketBuffer Class Reference

Class derived from the STL std::streambuf to allow streaming with sockets. More...

#include <socket_stream.h>

Inheritance diagram for net::SocketBuffer:
Collaboration diagram for net::SocketBuffer:

Public Types

enum  { INPUT_BUFFER_LENGTH = 500, OUTPUT_BUFFER_LENGTH = 500 }
 

Public Member Functions

 SocketBuffer (int sid, int in_len=INPUT_BUFFER_LENGTH, int out_len=OUTPUT_BUFFER_LENGTH)
 
virtual int sync ()
 
virtual int_type underflow ()
 
virtual int_type overflow (int_type c=EOF)
 
int GetReadBytes () const
 
SocketGetSocket ()
 
virtual ~SocketBuffer ()
 

Protected Attributes

int sum
 
int in_len
 
int out_len
 
char * in_buf
 
char * out_buf
 
Socket socket
 

Detailed Description

Class derived from the STL std::streambuf to allow streaming with sockets.

See the documentation related to this STL base class to understand the behaviour of the class SocketBuffer.

See also
std::streambuf
Socket

Member Enumeration Documentation

anonymous enum
Enumerator
INPUT_BUFFER_LENGTH 
OUTPUT_BUFFER_LENGTH 

Constructor & Destructor Documentation

net::SocketBuffer::SocketBuffer ( int  sid,
int  in_len = INPUT_BUFFER_LENGTH,
int  out_len = OUTPUT_BUFFER_LENGTH 
)
inline
virtual net::SocketBuffer::~SocketBuffer ( )
inlinevirtual

Member Function Documentation

int net::SocketBuffer::GetReadBytes ( ) const
inline
Socket* net::SocketBuffer::GetSocket ( )
inline
virtual int_type net::SocketBuffer::overflow ( int_type  c = EOF)
inlinevirtual

Here is the call graph for this function:

virtual int net::SocketBuffer::sync ( )
inlinevirtual

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int_type net::SocketBuffer::underflow ( )
inlinevirtual

Here is the call graph for this function:

Member Data Documentation

char* net::SocketBuffer::in_buf
protected
int net::SocketBuffer::in_len
protected
char* net::SocketBuffer::out_buf
protected
int net::SocketBuffer::out_len
protected
Socket net::SocketBuffer::socket
protected
int net::SocketBuffer::sum
protected

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