ACE_MEM_Stream
abstraction.
#include <ace/MEM_Stream.h>
class ACE_MEM_Stream : public ACE_MEM_IO {
public:
friend class ACE_MEM_Acceptor;
friend class ACE_MEM_Connector;
ACE_MEM_Stream (void);
ACE_MEM_Stream (ACE_HANDLE h);
~ACE_MEM_Stream (void);
ssize_t send_n (const void *buf, int n);
ssize_t recv_n (void *buf, int n);
ssize_t send_n (const void *buf, int n, int flags);
ssize_t recv_n (void *buf, int n, int flags);
ssize_t send_n ( const void *buf, size_t len, int flags, const ACE_Time_Value *timeout );
ssize_t recv_n ( void *buf, size_t len, int flags, const ACE_Time_Value *timeout );
ssize_t sendv_n (const iovec iov[], size_t n) const;
ssize_t recvv_n (iovec iov[], size_t n) const;
int close_reader (void);
int close_writer (void);
int close (void);
typedef ACE_Addr PEER_ADDR;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
};
ACE_MEM_IO
class.
ssize_t send_n (const void *buf, int n);
ssize_t recv_n (void *buf, int n);
ssize_t send_n (const void *buf, int n, int flags);
ssize_t recv_n (void *buf, int n, int flags);
ssize_t send_n (
const void *buf,
size_t len,
int flags,
const ACE_Time_Value *timeout
);
len
bytes into buf
from handle
(uses
the send
call). If send
blocks for longer than timeout
the
number of bytes actually sent is returned with errno == ETIME
.
If a timeout does not occur, send_n
return len
(i.e., the
number of bytes requested to be sent).
ssize_t recv_n (
void *buf,
size_t len,
int flags,
const ACE_Time_Value *timeout
);
len
bytes into buf
from handle
(uses
the ACE::recv_n
call). The ACE_Time_Value
indicates how long
to blocking trying to receive. If timeout
== 0, the caller
will block until action is possible, else will wait until the
relative time specified in *timeout
elapses). If recv
blocks
for longer than timeout
the number of bytes actually read is
returned with errno == ETIME
. If a timeout does not occur,
recv_n
return len
(i.e., the number of bytes requested to be
read).
ssize_t sendv_n (const iovec iov[], size_t n) const;
iovec
of size n
to the connected socket (uses
ACE::sendv_n
). Will block until all bytes are sent or an error
occurs.
ssize_t recvv_n (iovec iov[], size_t n) const;
iovec
of size n
to the connected socket.
int close_reader (void);
int close_writer (void);
int close (void);
close_writer
before doing
the close to avoid losing data).
typedef ACE_Addr PEER_ADDR;
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
nanbor@cs.wustl.edu