summaryrefslogtreecommitdiff
path: root/ace/SPIPE_Acceptor.h
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
commita5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch)
treebcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/SPIPE_Acceptor.h
downloadATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz
Initial revision
Diffstat (limited to 'ace/SPIPE_Acceptor.h')
-rw-r--r--ace/SPIPE_Acceptor.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/ace/SPIPE_Acceptor.h b/ace/SPIPE_Acceptor.h
new file mode 100644
index 00000000000..a5d45aa3b42
--- /dev/null
+++ b/ace/SPIPE_Acceptor.h
@@ -0,0 +1,78 @@
+/* -*- C++ -*- */
+// $Id$
+
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// SPIPE_Acceptor.h
+//
+// = AUTHOR
+// Doug Schmidt and Prashant Jain
+//
+// ============================================================================
+
+#if !defined (ACE_SPIPE_ACCEPTOR_H)
+#define ACE_SPIPE_ACCEPTOR_H
+
+#include "ace/SPIPE_Stream.h"
+
+class ACE_Export ACE_SPIPE_Acceptor : public ACE_SPIPE
+ // = TITLE
+ // Defines the format and interface for the listener side of the
+ // ACE_SPIPE_Stream.
+{
+public:
+#if defined (ACE_WIN32)
+ // = Maximum number of attempts to accept a connection
+ enum
+ {
+ MAX_PIPE_INSTANCES = PIPE_UNLIMITED_INSTANCES,
+ MAX_ACCEPT_ATTEMPTS = 3
+ };
+#endif
+
+ // = Initialization and termination methods.
+ ACE_SPIPE_Acceptor (void);
+ // Default constructor.
+
+ ACE_SPIPE_Acceptor (const ACE_SPIPE_Addr &local_sap,
+ int reuse_addr = 1,
+ int perms = ACE_DEFAULT_PERMS);
+ // Initiate a passive-mode STREAM pipe listener.
+
+ int open (const ACE_SPIPE_Addr &local_sap,
+ int reuse_addr = 1,
+ int perms = ACE_DEFAULT_PERMS);
+ // Initiate a passive-mode STREAM pipe listener.
+
+ int close (void);
+ // Close down the passive-mode STREAM pipe listener.
+
+ int remove (void);
+ // Remove the underlying mounted pipe from the file system.
+
+ // = Passive connection acceptance method.
+ int accept (ACE_SPIPE_Stream &ipc_sap_spipe,
+ ACE_SPIPE_Addr *remote_addr = 0,
+ ACE_Time_Value *timeout = 0,
+ int restart = 1);
+ // Accept a new data transfer connection. A <timeout> of 0 means
+ // block forever, a <timeout> of {0, 0} means poll. <restart> == 1
+ // means "restart if interrupted."
+
+ void dump (void) const;
+ // Dump the state of an object.
+
+ ACE_ALLOC_HOOK_DECLARE;
+ // Declare the dynamic allocation hooks.
+private:
+
+ int create_new_instance (int perms = 0);
+ // Create a new instance of an SPIPE.
+};
+
+#endif /* ACE_SPIPE_ACCEPTOR_H */