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

DEV_IO.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: DEV_IO.i,v 1.1.1.3 2003/02/21 18:36:32 chad Exp $
00003 
00004 // DEV_IO.i
00005 
00006 // Send exactly N bytes from BUF to this device.  Keeping trying until
00007 // this many bytes are sent.
00008 
00009 ASYS_INLINE ssize_t
00010 ACE_DEV_IO::send_n (const void *buf, size_t n) const
00011 {
00012   ACE_TRACE ("ACE_DEV_IO::send_n");
00013   return ACE::write_n (this->get_handle (), buf, n);
00014 }
00015 
00016 // Receive exactly N bytes from this file into BUF.  Keep trying until
00017 // this many bytes are received.
00018 
00019 ASYS_INLINE ssize_t
00020 ACE_DEV_IO::recv_n (void *buf, size_t n) const
00021 {
00022   ACE_TRACE ("ACE_DEV_IO::recv_n");
00023   return ACE::read_n (this->get_handle (), buf, n);
00024 }
00025 
00026 ASYS_INLINE ssize_t
00027 ACE_DEV_IO::send (const void *buf, size_t n) const
00028 {
00029   ACE_TRACE ("ACE_DEV_IO::send");
00030   return ACE_OS::write (this->get_handle (), (const char *) buf, n);
00031 }
00032 
00033 ASYS_INLINE ssize_t
00034 ACE_DEV_IO::recv (void *buf, size_t n) const
00035 {
00036   ACE_TRACE ("ACE_DEV_IO::recv");
00037   return ACE_OS::read (this->get_handle (), (char *) buf, n);
00038 }
00039 
00040 ASYS_INLINE ssize_t
00041 ACE_DEV_IO::send (const iovec iov[], size_t n) const
00042 {
00043   ACE_TRACE ("ACE_DEV_IO::send");
00044   return ACE_OS::writev (this->get_handle (), iov, ACE_static_cast (int, n));
00045 }
00046 
00047 ASYS_INLINE ssize_t
00048 ACE_DEV_IO::recv (iovec iov[], size_t n) const
00049 {
00050   ACE_TRACE ("ACE_DEV_IO::recv");
00051   return ACE_OS::readv (this->get_handle (), iov, ACE_static_cast (int, n));
00052 }
00053 
00054 ASYS_INLINE ssize_t
00055 ACE_DEV_IO::send (const void *buf, size_t n,
00056                   ACE_OVERLAPPED *overlapped) const
00057 {
00058   ACE_TRACE ("ACE_DEV_IO::send");
00059   return ACE_OS::write (this->get_handle (),
00060                         (const char *) buf, n,
00061                         overlapped);
00062 }
00063 
00064 ASYS_INLINE ssize_t
00065 ACE_DEV_IO::recv (void *buf, size_t n,
00066                   ACE_OVERLAPPED *overlapped) const
00067 {
00068   ACE_TRACE ("ACE_DEV_IO::recv");
00069   return ACE_OS::read (this->get_handle (), (char *) buf, n,
00070                        overlapped);
00071 }
00072 
00073 #if defined (ACE_HAS_STREAM_PIPES)
00074 ASYS_INLINE ssize_t
00075 ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const
00076 {
00077   ACE_TRACE ("ACE_DEV_IO::recv");
00078   return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
00079 }
00080 
00081 ASYS_INLINE ssize_t
00082 ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const
00083 {
00084   ACE_TRACE ("ACE_DEV_IO::send");
00085   return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags);
00086 }
00087 
00088 ASYS_INLINE ssize_t
00089 ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const
00090 {
00091   ACE_TRACE ("ACE_DEV_IO::recv");
00092   return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
00093 }
00094 
00095 ASYS_INLINE ssize_t
00096 ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const
00097 {
00098   ACE_TRACE ("ACE_DEV_IO::send");
00099   return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags);
00100 }
00101 #endif /* ACE_HAS_STREAM_PIPES */

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