ACE 8.0.5
Loading...
Searching...
No Matches
ACE_MEM_Stream Class Reference

Defines the methods in the ACE_MEM_Stream abstraction. More...

#include <MEM_Stream.h>

Inheritance diagram for ACE_MEM_Stream:
Collaboration diagram for ACE_MEM_Stream:

Public Types

typedef ACE_Addr PEER_ADDR
Public Types inherited from ACE_MEM_IO
enum  Signal_Strategy { Reactive , MT }

Public Member Functions

 ACE_MEM_Stream ()
 Constructor.
 ACE_MEM_Stream (ACE_HANDLE h)
 Constructor (sets the underlying ACE_HANDLE with <h>).
 ~ACE_MEM_Stream ()
 Destructor.
ssize_t send_n (const void *buf, size_t n)
ssize_t recv_n (void *buf, size_t n)
ssize_t send_n (const void *buf, size_t n, int flags)
ssize_t recv_n (void *buf, size_t n, int flags)
int close_reader ()
 Close down the reader.
int close_writer ()
 Close down the writer.
int close ()
void dump () const
 Dump the state of an object.
Public Member Functions inherited from ACE_MEM_IO
 ACE_MEM_IO ()
 Constructor.
 ~ACE_MEM_IO ()
 Destructor.
int init (const ACE_TCHAR *name, ACE_MEM_IO::Signal_Strategy type=ACE_MEM_IO::Reactive, ACE_MEM_SAP::MALLOC_OPTIONS *options=0)
int fini ()
ssize_t send (const void *buf, size_t n, int flags)
ssize_t recv (void *buf, size_t n, int flags)
 Recv an n byte buffer from the shm_malloc_ thru connected socket.
ssize_t send (const void *buf, size_t n)
ssize_t recv (void *buf, size_t n)
 Recv an n byte buffer from the shm_malloc_ thru connected socket.
ssize_t send (const void *buf, size_t n, const ACE_Time_Value *timeout)
ssize_t send (const void *buf, size_t n, int flags, const ACE_Time_Value *timeout)
ssize_t send (const ACE_Message_Block *message_block, const ACE_Time_Value *timeout)
ssize_t recv (void *buf, size_t n, const ACE_Time_Value *timeout)
ssize_t recv (void *buf, size_t n, int flags, const ACE_Time_Value *timeout)
void dump () const
 Dump the state of an object.
Public Member Functions inherited from ACE_SOCK
int set_option (int level, int option, void *optval, int optlen) const
 Wrapper around the setsockopt system call.
int get_option (int level, int option, void *optval, int *optlen) const
 Wrapper around the getsockopt system call.
int close ()
int get_local_addr (ACE_Addr &) const
int get_remote_addr (ACE_Addr &) const
void dump () const
 Dump the state of an object.
int open (int type, int protocol_family, int protocol, int reuse_addr)
 Wrapper around the BSD-style socket system call (no QoS).
int open (int type, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g, u_long flags, int reuse_addr)
 Wrapper around the QoS-enabled WSASocket function.
Public Member Functions inherited from ACE_IPC_SAP
int control (int cmd, void *) const
 Interface for <ioctl>.
int enable (int value) const
int disable (int value) const
ACE_HANDLE get_handle () const
 Get the underlying handle.
void set_handle (ACE_HANDLE handle)
 Set the underlying handle.
void dump () const
 Dump the state of an object.

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Public Attributes inherited from ACE_MEM_IO
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Public Attributes inherited from ACE_SOCK
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Public Attributes inherited from ACE_IPC_SAP
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.

Friends

class ACE_MEM_Acceptor
class ACE_MEM_Connector

Additional Inherited Members

Protected Member Functions inherited from ACE_SOCK
 ACE_SOCK (int type, int protocol_family, int protocol=0, int reuse_addr=0)
 ACE_SOCK (int type, int protocol_family, int protocol, ACE_Protocol_Info *protocolinfo, ACE_SOCK_GROUP g, u_long flags, int reuse_addr)
 ACE_SOCK ()
 ~ACE_SOCK ()=default
 Protected destructor.
Protected Member Functions inherited from ACE_IPC_SAP
 ACE_IPC_SAP ()
 Default constructor.
 ~ACE_IPC_SAP ()
 Protected destructor.

Detailed Description

Defines the methods in the ACE_MEM_Stream abstraction.

This adds additional wrapper methods atop the ACE_MEM_IO class. Notice that ACE_MEM_Stream can only send messages no bigger than the underlying MMAP file size minus sizeof (ACE_MEM_SAP_Node). The size of the MMAP file is default to ACE_MEM_STREAM_MIN_BUFFER. (Define above in this file, to 4096 bytes.) If you need to increase the size of allowable message ACE_MEM_Stream can handle, you can set it to either ACE_MEM_Acceptor::malloc_options(). minimal_bytes_ ACE_MEM_Acceptor::init_buffer_size (size_t size); before establishing a connection.

Member Typedef Documentation

◆ PEER_ADDR

Constructor & Destructor Documentation

◆ ACE_MEM_Stream() [1/2]

ACE_MEM_Stream::ACE_MEM_Stream ( )
inline

Constructor.

◆ ACE_MEM_Stream() [2/2]

ACE_MEM_Stream::ACE_MEM_Stream ( ACE_HANDLE h)
inline

Constructor (sets the underlying ACE_HANDLE with <h>).

◆ ~ACE_MEM_Stream()

ACE_MEM_Stream::~ACE_MEM_Stream ( )
inline

Destructor.

Member Function Documentation

◆ close()

int ACE_MEM_Stream::close ( )

Close down the socket (we need this to make things work correctly on Win32, which requires use to do a <close_writer> before doing the close to avoid losing data).

◆ close_reader()

int ACE_MEM_Stream::close_reader ( )
inline

Close down the reader.

◆ close_writer()

int ACE_MEM_Stream::close_writer ( )
inline

Close down the writer.

◆ dump()

void ACE_MEM_Stream::dump ( ) const

Dump the state of an object.

◆ recv_n() [1/2]

ssize_t ACE_MEM_Stream::recv_n ( void * buf,
size_t n )
inline

◆ recv_n() [2/2]

ssize_t ACE_MEM_Stream::recv_n ( void * buf,
size_t n,
int flags )
inline

◆ send_n() [1/2]

ssize_t ACE_MEM_Stream::send_n ( const void * buf,
size_t n )
inline

Send n bytes, keep trying until n are sent. Recv n bytes, keep trying until n are received.

◆ send_n() [2/2]

ssize_t ACE_MEM_Stream::send_n ( const void * buf,
size_t n,
int flags )
inline

Send n bytes, keep trying until n are sent. Recv n bytes, keep trying until n are received.

◆ ACE_MEM_Acceptor

friend class ACE_MEM_Acceptor
friend

◆ ACE_MEM_Connector

friend class ACE_MEM_Connector
friend

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

ACE_MEM_Stream::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.


The documentation for this class was generated from the following files: