#include <IOStream_T.h>
Public Member Functions | |
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=0) |
virtual ssize_t | recv (char *buf, ssize_t len, int flags, ACE_Time_Value *tv=0) |
virtual ssize_t | recv_n (char *buf, ssize_t len, int flags=0, ACE_Time_Value *tv=0) |
Protected Member Functions | |
virtual ACE_HANDLE | get_handle (void) |
Protected Attributes | |
STREAM * | peer_ |
This will be our ACE_SOCK_Stream or similar object. |
Definition at line 45 of file IOStream_T.h.
ACE_Streambuf_T< STREAM >::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.
Definition at line 26 of file IOStream_T.cpp.
: ACE_Streambuf (streambuf_size, io_mode), peer_ (peer) { // A streambuf allows for unbuffered IO where every character is // read as requested and written as provided. To me, this seems // terribly inefficient for socket-type operations, so I've disabled // it. All of the work would be done by the underflow/overflow // functions anyway and I haven't implemented anything there to // support unbuffered IO. #if !defined (ACE_LACKS_UNBUFFERED_STREAMBUF) this->unbuffered (0); #endif /* ! ACE_LACKS_UNBUFFERED_STREAMBUF */ // Linebuffered is similar to unbuffered. Again, I don't have any // need for this and I don't see the advantage. I believe this // would have to be supported by underflow/overflow to be effective. #if !defined (ACE_LACKS_LINEBUFFERED_STREAMBUF) this->linebuffered (0); #endif /* ! ACE_LACKS_LINEBUFFERED_STREAMBUF */ }
ACE_HANDLE ACE_Streambuf_T< STREAM >::get_handle | ( | void | ) | [protected, virtual] |
Reimplemented from ACE_Streambuf.
Definition at line 94 of file IOStream_T.cpp.
ssize_t ACE_Streambuf_T< STREAM >::recv | ( | char * | buf, | |
ssize_t | len, | |||
ACE_Time_Value * | tv = 0 | |||
) | [virtual] |
Implements ACE_Streambuf.
Definition at line 58 of file IOStream_T.cpp.
ssize_t ACE_Streambuf_T< STREAM >::recv | ( | char * | buf, | |
ssize_t | len, | |||
int | flags, | |||
ACE_Time_Value * | tv = 0 | |||
) | [virtual] |
Implements ACE_Streambuf.
Definition at line 66 of file IOStream_T.cpp.
ssize_t ACE_Streambuf_T< STREAM >::recv_n | ( | char * | buf, | |
ssize_t | len, | |||
int | flags = 0 , |
|||
ACE_Time_Value * | tv = 0 | |||
) | [virtual] |
Implements ACE_Streambuf.
Definition at line 80 of file IOStream_T.cpp.
ssize_t ACE_Streambuf_T< STREAM >::send | ( | char * | buf, | |
ssize_t | len | |||
) | [virtual] |
Stream connections and "unconnected connections" (ie -- datagrams) need to work just a little differently. We derive custom Streambuf objects for them and provide these functions at that time.
Implements ACE_Streambuf.
Definition at line 52 of file IOStream_T.cpp.
STREAM* ACE_Streambuf_T< STREAM >::peer_ [protected] |
This will be our ACE_SOCK_Stream or similar object.
Definition at line 78 of file IOStream_T.h.