ACE_Streambuf_T3
Usage
#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.
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