summaryrefslogtreecommitdiff
path: root/ace/CLASSIX/CLASSIX_Stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/CLASSIX/CLASSIX_Stream.h')
-rw-r--r--ace/CLASSIX/CLASSIX_Stream.h89
1 files changed, 47 insertions, 42 deletions
diff --git a/ace/CLASSIX/CLASSIX_Stream.h b/ace/CLASSIX/CLASSIX_Stream.h
index b9282e4450b..75ec415fe38 100644
--- a/ace/CLASSIX/CLASSIX_Stream.h
+++ b/ace/CLASSIX/CLASSIX_Stream.h
@@ -5,13 +5,13 @@
//
// = LIBRARY
// ace
-//
+//
// = FILENAME
// CLASSIX_Stream.h
//
// = AUTHOR(S)
// Nokia Telecommunications
-//
+//
// ============================================================================
#ifndef ACE_CLASSIX_STREAM_H
@@ -19,6 +19,11 @@
/* ------------------------------------------------------------------------- */
#include "ace/CLASSIX/CLASSIX_SAP.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
#include "ace/CLASSIX/CLASSIX_Peer_SAP.h"
#include "ace/CLASSIX/CLASSIX_Port_Default.h"
@@ -27,14 +32,14 @@ class ACE_CLASSIX_Stream
// Provides the stream interface for CLASSIX IPC communications.
//
// = DESCRIPTION
- // This classes provides a stream wrapper over CLASSIX'
- // IPC. It is designed to be an alternative to Stream type of
+ // This classes provides a stream wrapper over CLASSIX'
+ // IPC. It is designed to be an alternative to Stream type of
// communication in the UNIX AF_INET environment.
//
// To the user, the stream is connection-oriented. The stream
// is implemented on top of IPC, it is connectionless and its
// reliability is as good as what the raw IPC can offer.
- //
+ //
// Since CLASSIX IPC is not intended to go across wide area network,
// it can be seen as an
// alternative to AF_INET's connection oriented stream, even though
@@ -42,57 +47,57 @@ class ACE_CLASSIX_Stream
//
// This class contains a local sap, peer sap and data holding
// delivery mode information.
- //
+ //
// When a stream is created, the peer SAP information must be provided.
// The local SAP information may be provided in the constructor or
// open(). The local SAP information given in open() overrides the
// existing one. If the local SAP address is not given at all, it will
// allocate a port and use it as the local SAP.
- //
+ //
{
public:
ACE_CLASSIX_Stream(void);
// Default constructor, does not setup anything
ACE_CLASSIX_Stream(const ACE_CLASSIX_Port_Core&, /* remote port */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance()); /* local address */
-
+ const ACE_CLASSIX_Port& =
+ *ACE_CLASSIX_DEFAULT_PORT::instance()); /* local address */
+
ACE_CLASSIX_Stream(const ACE_CLASSIX_Port&, /* remote port address */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
-
+ const ACE_CLASSIX_Port& =
+ *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
+
ACE_CLASSIX_Stream(const KnUniqueId&, /* remote port address */
- const ACE_CLASSIX_Port& =
- *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
-
+ const ACE_CLASSIX_Port& =
+ *ACE_CLASSIX_DEFAULT_PORT::instance());/* local address */
+
// = IO
// Returns -1, if fault has occured during receive. errno contains
// the error condition.
// Returns no of bytes received/sent, otherwise.
- //
- virtual ssize_t send_n (const void *, /* buf */
- size_t, /* n */
- int /* flags */);
+ //
+ virtual ssize_t send_n (const void *, /* buf */
+ size_t, /* n */
+ int /* flags */);
// Sends exactly n bytes (keep trying until n bytes are sent)
virtual ssize_t send_n (const void *, /* buf */ size_t /* n */) const;
// Sends n bytes(keep trying until n bytes are sent)
// Uses the current addressing mode
- virtual ssize_t send (const void *, /* buf */
- size_t, /* n */
- int /* flags */);
+ virtual ssize_t send (const void *, /* buf */
+ size_t, /* n */
+ int /* flags */);
// Sends n bytes. Same as send_n(buf, n, flag)
- virtual ssize_t send (const void *, /* buf */
- size_t /* n */) const;
+ virtual ssize_t send (const void *, /* buf */
+ size_t /* n */) const;
// Sends n bytes. same as send_n(buf, n).
- virtual ssize_t reply (const void *, /* buf */
- size_t /* n */) const;
+ virtual ssize_t reply (const void *, /* buf */
+ size_t /* n */) const;
// Sends n bytes to the sender of the cureent thread's current message.
ssize_t ipcRecv (void *, /* buffer */
- size_t, /* length */
- int = 0, /* flag: 0 or MSG_PEEK */
- ACE_Time_Value* = 0) const; /* timeout */
- // Recv an <n> byte buffer
+ size_t, /* length */
+ int = 0, /* flag: 0 or MSG_PEEK */
+ ACE_Time_Value* = 0) const; /* timeout */
+ // Recv an <n> byte buffer
// Wait up to <timeout> amount of time to receive up to <n> bytes
// into <buf> from <handle> (uses the <recv> call). If <recv> times
// out a -1 is returned with <errno == ETIMEOUT>. If it succeeds the
@@ -101,9 +106,9 @@ class ACE_CLASSIX_Stream
// will block until action is possible, else will wait until the
// relative time specified in *<timeout> elapses).
ssize_t ipcRecv_n (void *, /* buffer */
- size_t, /* length */
- int = 0, /* flag: 0 or MSG_PEEK */
- ACE_Time_Value* = 0) const; /* timeout */
+ size_t, /* length */
+ int = 0, /* flag: 0 or MSG_PEEK */
+ ACE_Time_Value* = 0) const; /* timeout */
// Continue until receives n bytes of data or an error has occurred.
// Retruns the no of bytes actually received.
// If it is less than expected, errno contains error info.
@@ -142,10 +147,10 @@ class ACE_CLASSIX_Stream
int is_selectable(void) const;
// Retruns 1, if the local SAP is enabled.
int is_writer_closed(void) const;
- // Retruns 1, if writer side is closed.
+ // Retruns 1, if writer side is closed.
int is_reader_closed(void) const;
// Retruns 1, if reader side is closed.
-
+
// = CONTROL
int set_peer_sap(const ACE_Addr&);
@@ -201,7 +206,7 @@ class ACE_CLASSIX_Stream
// = HELPER
void dump (void) const;
// Dump the state of an object.
-
+
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
@@ -223,7 +228,7 @@ class ACE_CLASSIX_Stream
void set_target_(void);
// set the delivery target structure using the existing peer information
- virtual int set_mode_(u_int = K_BROADMODE); /* theMode */
+ virtual int set_mode_(u_int = K_BROADMODE); /* theMode */
// Sets the addressing mode with the current setting of coTarget
virtual int set_mode_(u_int, /* mode */ int /* site */);
// Sets the addressing mode as well as the coTarget
@@ -235,12 +240,12 @@ class ACE_CLASSIX_Stream
ACE_CLASSIX_Port_Core *local_port_;
// if non-zero, it will be
// deleted on exit.
-
+
ACE_CLASSIX_Peer_SAP peer_sap_;
- int peer_sap_closed_;
+ int peer_sap_closed_;
// 0 if it's not closed(default),
// 1 if it's closed.
-
+
// Mode applied destination address
// Can be changed by control()/set_mode_()
// Mode is applicable in IPC classes other than the Stream class.
@@ -253,7 +258,7 @@ class ACE_CLASSIX_Stream
private:
// Disable copy constructor
ACE_CLASSIX_Stream(ACE_CLASSIX_Stream const&);
- ACE_CLASSIX_Stream const& operator=(ACE_CLASSIX_Stream const&);
+ ACE_CLASSIX_Stream const& operator=(ACE_CLASSIX_Stream const&);
};
/* ------------------------------------------------------------------------- */