FIFO_Recv.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    FIFO_Recv.h
00006  *
00007  *  FIFO_Recv.h,v 4.20 2006/03/14 21:15:49 sjiang Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_FIFO_RECV_H
00015 #define ACE_FIFO_RECV_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "ace/FIFO.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/os_include/os_fcntl.h"
00026 #include "ace/Default_Constants.h"
00027 
00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 /**
00031  * @class ACE_FIFO_Recv
00032  *
00033  * @brief Receiver side of the bytestream C++ wrapper for UNIX
00034  * FIFOs.
00035  */
00036 class ACE_Export ACE_FIFO_Recv : public ACE_FIFO
00037 {
00038 public:
00039   // = Initialization methods.
00040   /// Default constructor.
00041   ACE_FIFO_Recv (void);
00042 
00043   /// Open up a bytestream named pipe for reading.
00044   ACE_FIFO_Recv (const ACE_TCHAR *rendezvous,
00045                  int flags = O_CREAT | O_RDONLY,
00046                  mode_t perms = ACE_DEFAULT_FILE_PERMS,
00047                  int persistent = 1,
00048                  LPSECURITY_ATTRIBUTES sa = 0);
00049 
00050   /// Open up a bytestream named pipe for reading.
00051   int open (const ACE_TCHAR *rendezvous,
00052             int flags = O_CREAT | O_RDONLY,
00053             mode_t perms = ACE_DEFAULT_FILE_PERMS,
00054             int persistent = 1,
00055             LPSECURITY_ATTRIBUTES sa = 0);
00056 
00057   /// Close down the named pipe.
00058   int close (void);
00059 
00060   /// Recv <buf> of up to <len> bytes.
00061   ssize_t recv (void *buf, size_t len);
00062 
00063   /// Recv <buf> of exactly <len> bytes (block until done).
00064   ssize_t recv_n (void *buf, size_t len);
00065 
00066   /// Dump the state of an object.
00067   void dump (void) const;
00068 
00069   /// Declare the dynamic allocation hooks.
00070   ACE_ALLOC_HOOK_DECLARE;
00071 
00072 private:
00073   /// Auxiliary handle that is used to implement persistent FIFOs.
00074   ACE_HANDLE aux_handle_;
00075 };
00076 
00077 ACE_END_VERSIONED_NAMESPACE_DECL
00078 
00079 #if defined (__ACE_INLINE__)
00080 #include "ace/FIFO_Recv.inl"
00081 #endif /* __ACE_INLINE__ */
00082 
00083 #include /**/ "ace/post.h"
00084 
00085 #endif /* ACE_FIFO_RECV_H */

Generated on Thu Nov 9 09:41:50 2006 for ACE by doxygen 1.3.6