os_uio.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_uio.h
00006  *
00007  *  definitions for vector I/O operations
00008  *
00009  *  $Id: os_uio.h 80826 2008-03-04 14:51:23Z wotte $
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
00013  */
00014 //=============================================================================
00015 
00016 #ifndef ACE_OS_INCLUDE_SYS_OS_UIO_H
00017 #define ACE_OS_INCLUDE_SYS_OS_UIO_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "ace/config-lite.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/sys/os_types.h"
00028 #include "ace/os_include/os_limits.h"
00029 
00030 #if !defined (ACE_LACKS_SYS_UIO_H)
00031 #  include /**/ <sys/uio.h>
00032 #endif /* !ACE_LACKS_SYS_UIO_H */
00033 
00034 // Place all additions (especially function declarations) within extern "C" {}
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif /* __cplusplus */
00039 
00040 #if defined (ACE_LACKS_IOVEC)
00041    /// The ordering of the fields in this struct is important.  It has to
00042    /// match those in WSABUF.
00043    struct iovec
00044    {
00045      /// byte count to read/write
00046      u_long iov_len;
00047      /// data to be read/written
00048      char *iov_base;
00049 
00050      // WSABUF is a Winsock2-only type.
00051 #  if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00052      operator WSABUF &(void) { return *((WSABUF *) this); }
00053 #  endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */
00054    };
00055 #endif /* ACE_LACKS_IOVEC */
00056 
00057 
00058 # if defined (ACE_LACKS_TIMEDWAIT_PROTOTYPES)
00059 
00060   ssize_t readv_timedwait (ACE_HANDLE handle,
00061                            const iovec *iov,
00062                            int iovcnt,
00063                            struct timespec* timeout);
00064 
00065   ssize_t writev_timedwait (ACE_HANDLE handle,
00066                             const iovec *iov,
00067                             int iovcnt,
00068                             struct timespec *timeout);
00069 
00070 # endif /* ACE_LACKS_TIMEDWAIT_PROTOTYPES */
00071 
00072 #ifdef __cplusplus
00073 }
00074 #endif /* __cplusplus */
00075 
00076 #include /**/ "ace/post.h"
00077 #endif /* ACE_OS_INCLUDE_SYS_OS_UIO_H */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7