Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

FILE_IO.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: FILE_IO.i,v 1.1.1.3 2003/02/21 18:36:32 chad Exp $
00003 
00004 // FILE_IO.i
00005 
00006 ASYS_INLINE ssize_t
00007 ACE_FILE_IO::sendv_n (const iovec iov[], int n) const
00008 {
00009   ACE_TRACE ("ACE_FILE_IO::sendv_n");
00010   return ACE::writev_n (this->get_handle (),
00011                         iov,
00012                         n);
00013 }
00014 
00015 ASYS_INLINE ssize_t
00016 ACE_FILE_IO::send_n (const ACE_Message_Block *message_block,
00017                      const ACE_Time_Value *timeout,
00018                      size_t *bytes_transferred)
00019 {
00020   ACE_TRACE ("ACE_FILE_IO::send_n");
00021   ACE_UNUSED_ARG (timeout);
00022   return ACE::write_n (this->get_handle (),
00023                       message_block,
00024                       bytes_transferred);
00025 }
00026 
00027 // Recv an n byte message from the file.
00028 
00029 ASYS_INLINE ssize_t
00030 ACE_FILE_IO::recvv_n (iovec iov[], int n) const
00031 {
00032   ACE_TRACE ("ACE_FILE_IO::recvv_n");
00033   // @@ Carlos, can you please update this to call the
00034   // new ACE::recvv_n() method that you write?
00035   return ACE_OS::readv (this->get_handle (),
00036                         iov,
00037                         n);
00038 }
00039 
00040 // Send an <iovec> of size <n> to the file.
00041 
00042 ASYS_INLINE ssize_t
00043 ACE_FILE_IO::sendv (const iovec iov[], int n) const
00044 {
00045   ACE_TRACE ("ACE_FILE_IO::sendv");
00046   return ACE_OS::writev (this->get_handle (), iov, n);
00047 }
00048 
00049 // Send exactly N bytes from BUF to this file.  Keeping trying until
00050 // this many bytes are sent.
00051 
00052 ASYS_INLINE ssize_t
00053 ACE_FILE_IO::send_n (const void *buf, size_t n) const
00054 {
00055   ACE_TRACE ("ACE_FILE_IO::send_n");
00056   return ACE::write_n (this->get_handle (), buf, n);
00057 }
00058 
00059 // Receive exactly N bytes from this file into BUF.  Keep trying until
00060 // this many bytes are received.
00061 
00062 ASYS_INLINE ssize_t
00063 ACE_FILE_IO::recv_n (void *buf, size_t n) const
00064 {
00065   ACE_TRACE ("ACE_FILE_IO::recv_n");
00066   return ACE::read_n (this->get_handle (), buf, n);
00067 }
00068 
00069 ASYS_INLINE ssize_t
00070 ACE_FILE_IO::send (const void *buf, size_t n) const
00071 {
00072   ACE_TRACE ("ACE_FILE_IO::send");
00073   return ACE_OS::write (this->get_handle (), (const char *) buf, n);
00074 }
00075 
00076 ASYS_INLINE ssize_t
00077 ACE_FILE_IO::recv (void *buf, size_t n) const
00078 {
00079   ACE_TRACE ("ACE_FILE_IO::recv");
00080   return ACE_OS::read (this->get_handle (), (char *) buf, n);
00081 }
00082 
00083 ASYS_INLINE ssize_t
00084 ACE_FILE_IO::send (const iovec iov[], int n) const
00085 {
00086   ACE_TRACE ("ACE_FILE_IO::send");
00087   return ACE_OS::writev (this->get_handle (), iov, n);
00088 }
00089 
00090 ASYS_INLINE ssize_t
00091 ACE_FILE_IO::recv (iovec iov[], int n) const
00092 {
00093   ACE_TRACE ("ACE_FILE_IO::recv");
00094   return ACE_OS::readv (this->get_handle (), iov, n);
00095 }
00096 
00097 #if defined (ACE_HAS_STREAM_PIPES)
00098 ASYS_INLINE ssize_t
00099 ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const
00100 {
00101   ACE_TRACE ("ACE_FILE_IO::recv");
00102   return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
00103 }
00104 
00105 ASYS_INLINE ssize_t
00106 ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const
00107 {
00108   ACE_TRACE ("ACE_FILE_IO::send");
00109   return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
00110 }
00111 
00112 ASYS_INLINE ssize_t
00113 ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const
00114 {
00115   ACE_TRACE ("ACE_FILE_IO::recv");
00116   return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
00117 }
00118 
00119 ASYS_INLINE ssize_t
00120 ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const
00121 {
00122   ACE_TRACE ("ACE_FILE_IO::send");
00123   return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
00124 }
00125 
00126 ASYS_INLINE ssize_t
00127 ACE_FILE_IO::send (const void *buf, size_t n,
00128                        ACE_OVERLAPPED *overlapped) const
00129 {
00130   ACE_TRACE ("ACE_FILE_IO::send");
00131   return ACE_OS::write (this->get_handle (),
00132                         (const char *) buf, n,
00133                         overlapped);
00134 }
00135 
00136 ASYS_INLINE ssize_t
00137 ACE_FILE_IO::recv (void *buf, size_t n,
00138                        ACE_OVERLAPPED *overlapped) const
00139 {
00140   ACE_TRACE ("ACE_FILE_IO::recv");
00141   return ACE_OS::read (this->get_handle (), (char *) buf, n,
00142                        overlapped);
00143 }
00144 
00145 #endif /* ACE_HAS_STREAM_PIPES */

Generated on Mon Jun 16 11:19:41 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002