FdIOClient.cc

Go to the documentation of this file.
00001 /*
00002  *    Copyright 2004-2006 Intel Corporation
00003  * 
00004  *    Licensed under the Apache License, Version 2.0 (the "License");
00005  *    you may not use this file except in compliance with the License.
00006  *    You may obtain a copy of the License at
00007  * 
00008  *        http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  *    Unless required by applicable law or agreed to in writing, software
00011  *    distributed under the License is distributed on an "AS IS" BASIS,
00012  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *    See the License for the specific language governing permissions and
00014  *    limitations under the License.
00015  */
00016 
00017 
00018 #include "FdIOClient.h"
00019 #include "IO.h"
00020 #include "debug/DebugUtils.h"
00021 
00022 namespace oasys {
00023 
00024 FdIOClient::FdIOClient(int fd, Notifier* intr)
00025     : IOHandlerBase(intr), 
00026       Logger("FdIOClient", "/oasys/io/FdIOClient"), 
00027       fd_(fd)
00028 {}
00029 
00030 int 
00031 FdIOClient::read(char* bp, size_t len)
00032 {
00033     return IO::read(fd_, bp, len, get_notifier(), logpath_);
00034 }
00035 
00036 int 
00037 FdIOClient::readv(const struct iovec* iov, int iovcnt)
00038 {
00039     return IO::readv(fd_, iov, iovcnt, get_notifier(), logpath_);
00040 }
00041 
00042 int 
00043 FdIOClient::readall(char* bp, size_t len)
00044 {
00045     return IO::readall(fd_, bp, len, get_notifier(), logpath_);
00046 }
00047 
00048 int 
00049 FdIOClient::readvall(const struct iovec* iov, int iovcnt)
00050 {
00051     return IO::readvall(fd_, iov, iovcnt, get_notifier(), logpath_);
00052 }
00053 
00054 int 
00055 FdIOClient::write(const char* bp, size_t len)
00056 {
00057     return IO::write(fd_, bp, len, get_notifier(), logpath_);
00058 }
00059 
00060 int
00061 FdIOClient::writev(const struct iovec* iov, int iovcnt)
00062 {
00063     return IO::writev(fd_, iov, iovcnt, get_notifier(), logpath_);
00064 }
00065 
00066 int 
00067 FdIOClient::writeall(const char* bp, size_t len)
00068 {
00069     return IO::writeall(fd_, bp, len, get_notifier(), logpath_);
00070 }
00071 
00072 int 
00073 FdIOClient::writevall(const struct iovec* iov, int iovcnt)
00074 {
00075     return IO::writevall(fd_, iov, iovcnt, get_notifier(), logpath_);
00076 }
00077 
00078 int 
00079 FdIOClient::timeout_read(char* bp, size_t len, int timeout_ms)
00080 {
00081     return IO::timeout_read(fd_, bp, len, timeout_ms,
00082                             get_notifier(), logpath_);
00083 }
00084 
00085 int 
00086 FdIOClient::timeout_readv(const struct iovec* iov, int iovcnt,
00087                   int timeout_ms)
00088 {
00089     return IO::timeout_readv(fd_, iov, iovcnt, timeout_ms,
00090                              get_notifier(), logpath_);
00091 }
00092 
00093 int
00094 FdIOClient::timeout_readall(char* bp, size_t len, int timeout_ms)
00095 {
00096     return IO::timeout_readall(fd_, bp, len, timeout_ms,
00097                                get_notifier(), logpath_);
00098 }
00099 
00100 int
00101 FdIOClient::timeout_readvall(const struct iovec* iov, int iovcnt,
00102                              int timeout_ms)
00103 {
00104     return IO::timeout_readvall(fd_, iov, iovcnt, timeout_ms,
00105                                 get_notifier(), logpath_);
00106 }
00107 
00108 int 
00109 FdIOClient::timeout_write(const char* bp, size_t len, int timeout_ms)
00110 {
00111     return IO::timeout_write(fd_, bp, len, timeout_ms,
00112                              get_notifier(), logpath_);
00113 }
00114 
00115 int 
00116 FdIOClient::timeout_writev(const struct iovec* iov, int iovcnt,
00117                            int timeout_ms)
00118 {
00119     return IO::timeout_writev(fd_, iov, iovcnt, timeout_ms,
00120                               get_notifier(), logpath_);
00121 }
00122 
00123 int
00124 FdIOClient::timeout_writeall(const char* bp, size_t len, int timeout_ms)
00125 {
00126     return IO::timeout_writeall(fd_, bp, len, timeout_ms,
00127                                 get_notifier(), logpath_);
00128 }
00129 
00130 int
00131 FdIOClient::timeout_writevall(const struct iovec* iov, int iovcnt,
00132                              int timeout_ms)
00133 {
00134     return IO::timeout_writevall(fd_, iov, iovcnt, timeout_ms,
00135                                  get_notifier(), logpath_);
00136 }
00137 
00138 int
00139 FdIOClient::get_nonblocking(bool* nonblockingp)
00140 {
00141     return IO::get_nonblocking(fd_, nonblockingp, logpath_);
00142 }
00143 
00144 int
00145 FdIOClient::set_nonblocking(bool nonblocking)
00146 {
00147     return IO::set_nonblocking(fd_, nonblocking, logpath_);
00148 }
00149 
00150 } // namespace oasys

Generated on Sat Sep 8 08:43:27 2007 for DTN Reference Implementation by  doxygen 1.5.3