121 return *(
unsigned char*)
gptr ();
138 DL((
STRMBUF,
"Socketbuf::sys_read() returned %d bytes\n",
rval));
157 return (*(
unsigned char*)
gptr ());
249 DL((
STRMBUF,
"Buffered IO - allocating %d bytes\n",
260 DL((
STRMBUF,
"Unbuffered IO - same 1 byte array\n"));
#define DL(X)
A macro for writing debug message to the Logger.
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
A Hex/Ascii memory dump of similar to od(1) UNIX utility.
Abstraction of socket data type.
Socketbuf class is derived from Streambuf to provide I/O with the socket file descriptor.
A wrapper class to provide AutoPtr with reference semantics.
static void dump_to_log(unsigned long mask_, const char *info_, const char *msg_, int len_)
Write hex/ascii dump of a memory region to log file.
virtual handler_t getHandler() const =0
Get file descriptor.
int getBytesAvail(void) const
Return number of bytes available in socket receive buffer.
virtual int overflow(int c_=EOF)
This function is called to consume characters (flush them to output), typically when the put area is ...
Socket * m_s
Reference to the Socket stream.
virtual int showmanyc()
The morphemes of showmanyc are "es-how-many-see", not "show-man-ic".
int sys_read(char *b_, int len_)
virtual int doallocate()
This function is called by allocate when unbuffered() is zero and base() is zero.
int sys_write(char *b_, int len_)
virtual int underflow()
This function is called to supply characters for input (from some source) when the get area is empty,...
virtual int sync()
This function synchronizes the streambuf with its actual stream of characters.
char * pptr() const
Returns a pointer to the beginning of the put area, and thus to the location of the next character th...
char * base() const
Returns the lowest possible value for gptr() - the beginning of the get area.
void setp(char *pbeg_, char *pend_)
Set put area pointers.
char * epptr() const
Returns a pointer just past the end of the put area, the maximum possible value for pptr().
char * egptr() const
Returns a pointer just past the end of the get area, the maximum possible value for gptr().
static const int MAXTCPFRAMESZ
Size of the internal input/output buffer.
char * pbase() const
Returns a pointer to the beginning fo the space available for the put area, the lowest possible value...
void setb(char *b_, char *eb_, int del_)
Establish the reserve area (buffer).
void pbump(int n_)
Advances the next pointer for the output sequence by n_.
char * gptr() const
Returns a pointer to the beginning of the get area, and thus to the next character to be fetched (if ...
void setg(char *gbeg_, char *gnext_, char *gend_)
Set get area pointers.
@ STRMBUFTRACE
Extended Streambuf & friends messages
@ STRMBUF
Class Streambuf & friends messages
int get_errno()
Fetch error number in a portable way.