NAME
ACE_Streambuf_T
SYNOPSIS
#include <ace/IOStream_T.h>
template<class STREAM>
class ACE_Streambuf_T : public ACE_Streambuf
{
public:
ACE_Streambuf_T (
STREAM *peer,
u_int streambuf_size = ACE_STREAMBUF_SIZE,
int io_mode = ios::in | ios::out
);
virtual ssize_t send (char *buf, ssize_t len);
virtual ssize_t recv (
char *buf,
ssize_t len,
ACE_Time_Value *tv = NULL
);
virtual ssize_t recv (
char *buf,
ssize_t len,
int flags,
ACE_Time_Value * tv = NULL
);
virtual ssize_t recv_n (
char *buf,
ssize_t len,
int flags = 0,
ACE_Time_Value *tv = NULL
);
protected:
virtual ACE_HANDLE get_handle (void);
STREAM *peer_;
};
PUBLIC MEMBERS
ACE_Streambuf_T (
STREAM *peer,
u_int streambuf_size = ACE_STREAMBUF_SIZE,
int io_mode = ios::in | ios::out
);
We will be given a STREAM by the iostream object which creates us. See the ACE_IOStream template for how that works. Like other streambuf objects, we can be input-only, output-only or both.
virtual ssize_t send (char *buf, ssize_t len);
virtual ssize_t recv (
char *buf,
ssize_t len,
ACE_Time_Value *tv = NULL
);
virtual ssize_t recv (
char *buf,
ssize_t len,
int flags,
ACE_Time_Value * tv = NULL
);
virtual ssize_t recv_n (
char *buf,
ssize_t len,
int flags = 0,
ACE_Time_Value *tv = NULL
);
PROTECTED MEMBERS
virtual ACE_HANDLE get_handle (void);
STREAM *peer_;
This will be our ACE_SOCK_Stream or similar object.
AUTHOR
James CE Johnson [email protected] and Jim Crossley [email protected]
NOTE
This file should not be #included directly by application code. Instead, it should #include "ace/IOStream.h". That's because we only put some conditional compilations in that file.
LIBRARY
ace