FdIOClient.cc

Go to the documentation of this file.
00001 /*
00002  * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By
00003  * downloading, copying, installing or using the software you agree to
00004  * this license. If you do not agree to this license, do not download,
00005  * install, copy or use the software.
00006  * 
00007  * Intel Open Source License 
00008  * 
00009  * Copyright (c) 2004 Intel Corporation. All rights reserved. 
00010  * 
00011  * Redistribution and use in source and binary forms, with or without
00012  * modification, are permitted provided that the following conditions are
00013  * met:
00014  * 
00015  *   Redistributions of source code must retain the above copyright
00016  *   notice, this list of conditions and the following disclaimer.
00017  * 
00018  *   Redistributions in binary form must reproduce the above copyright
00019  *   notice, this list of conditions and the following disclaimer in the
00020  *   documentation and/or other materials provided with the distribution.
00021  * 
00022  *   Neither the name of the Intel Corporation nor the names of its
00023  *   contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *  
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00027  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00028  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00029  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
00030  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00031  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00032  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00033  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00034  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00035  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037  */
00038 
00039 #include "FdIOClient.h"
00040 #include "IO.h"
00041 #include "debug/DebugUtils.h"
00042 
00043 namespace oasys {
00044 
00045 FdIOClient::FdIOClient(int fd, Notifier* intr)
00046     : IOHandlerBase(intr), 
00047       Logger("FdIOClient", "/oasys/io/FdIOClient"), 
00048       fd_(fd)
00049 {}
00050 
00051 int 
00052 FdIOClient::read(char* bp, size_t len)
00053 {
00054     return IO::read(fd_, bp, len, get_notifier(), logpath_);
00055 }
00056 
00057 int 
00058 FdIOClient::readv(const struct iovec* iov, int iovcnt)
00059 {
00060     return IO::readv(fd_, iov, iovcnt, get_notifier(), logpath_);
00061 }
00062 
00063 int 
00064 FdIOClient::readall(char* bp, size_t len)
00065 {
00066     return IO::readall(fd_, bp, len, get_notifier(), logpath_);
00067 }
00068 
00069 int 
00070 FdIOClient::readvall(const struct iovec* iov, int iovcnt)
00071 {
00072     return IO::readvall(fd_, iov, iovcnt, get_notifier(), logpath_);
00073 }
00074 
00075 int 
00076 FdIOClient::write(const char* bp, size_t len)
00077 {
00078     return IO::write(fd_, bp, len, get_notifier(), logpath_);
00079 }
00080 
00081 int
00082 FdIOClient::writev(const struct iovec* iov, int iovcnt)
00083 {
00084     return IO::writev(fd_, iov, iovcnt, get_notifier(), logpath_);
00085 }
00086 
00087 int 
00088 FdIOClient::writeall(const char* bp, size_t len)
00089 {
00090     return IO::writeall(fd_, bp, len, get_notifier(), logpath_);
00091 }
00092 
00093 int 
00094 FdIOClient::writevall(const struct iovec* iov, int iovcnt)
00095 {
00096     return IO::writevall(fd_, iov, iovcnt, get_notifier(), logpath_);
00097 }
00098 
00099 int 
00100 FdIOClient::timeout_read(char* bp, size_t len, int timeout_ms)
00101 {
00102     return IO::timeout_read(fd_, bp, len, timeout_ms,
00103                             get_notifier(), logpath_);
00104 }
00105 
00106 int 
00107 FdIOClient::timeout_readv(const struct iovec* iov, int iovcnt,
00108                   int timeout_ms)
00109 {
00110     return IO::timeout_readv(fd_, iov, iovcnt, timeout_ms,
00111                              get_notifier(), logpath_);
00112 }
00113 
00114 int
00115 FdIOClient::timeout_readall(char* bp, size_t len, int timeout_ms)
00116 {
00117     return IO::timeout_readall(fd_, bp, len, timeout_ms,
00118                                get_notifier(), logpath_);
00119 }
00120 
00121 int
00122 FdIOClient::timeout_readvall(const struct iovec* iov, int iovcnt,
00123                              int timeout_ms)
00124 {
00125     return IO::timeout_readvall(fd_, iov, iovcnt, timeout_ms,
00126                                 get_notifier(), logpath_);
00127 }
00128 
00129 int 
00130 FdIOClient::timeout_write(const char* bp, size_t len, int timeout_ms)
00131 {
00132     return IO::timeout_write(fd_, bp, len, timeout_ms,
00133                              get_notifier(), logpath_);
00134 }
00135 
00136 int 
00137 FdIOClient::timeout_writev(const struct iovec* iov, int iovcnt,
00138                            int timeout_ms)
00139 {
00140     return IO::timeout_writev(fd_, iov, iovcnt, timeout_ms,
00141                               get_notifier(), logpath_);
00142 }
00143 
00144 int
00145 FdIOClient::timeout_writeall(const char* bp, size_t len, int timeout_ms)
00146 {
00147     return IO::timeout_writeall(fd_, bp, len, timeout_ms,
00148                                 get_notifier(), logpath_);
00149 }
00150 
00151 int
00152 FdIOClient::timeout_writevall(const struct iovec* iov, int iovcnt,
00153                              int timeout_ms)
00154 {
00155     return IO::timeout_writevall(fd_, iov, iovcnt, timeout_ms,
00156                                  get_notifier(), logpath_);
00157 }
00158 
00159 int
00160 FdIOClient::get_nonblocking(bool* nonblockingp)
00161 {
00162     return IO::get_nonblocking(fd_, nonblockingp, logpath_);
00163 }
00164 
00165 int
00166 FdIOClient::set_nonblocking(bool nonblocking)
00167 {
00168     return IO::set_nonblocking(fd_, nonblocking, logpath_);
00169 }
00170 
00171 } // namespace oasys

Generated on Fri Dec 22 14:47:59 2006 for DTN Reference Implementation by  doxygen 1.5.1