IPClient.h

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 #ifndef _OASYS_IP_CLIENT_H_
00019 #define _OASYS_IP_CLIENT_H_
00020 
00021 #include "IPSocket.h"
00022 #include "IOClient.h"
00023 
00024 namespace oasys {
00025 
00030 class IPClient : public IPSocket, public IOClient {
00031 private:
00032     IPClient(const IPClient&);  
00033     
00034 public:
00035     IPClient(int socktype, const char* logbase, Notifier* intr = 0);
00036     IPClient(int socktype, int sock,
00037              in_addr_t remote_addr, u_int16_t remote_port,
00038              const char* logbase, Notifier* intr = 0);
00039     virtual ~IPClient();
00040     
00041     // Virtual from IOClient
00042     virtual int read(char* bp, size_t len);
00043     virtual int write(const char* bp, size_t len);
00044     virtual int readv(const struct iovec* iov, int iovcnt);
00045     virtual int writev(const struct iovec* iov, int iovcnt);
00046     
00047     virtual int readall(char* bp, size_t len);
00048     virtual int writeall(const char* bp, size_t len);
00049     virtual int readvall(const struct iovec* iov, int iovcnt);
00050     virtual int writevall(const struct iovec* iov, int iovcnt);
00051     
00052     virtual int timeout_read(char* bp, size_t len, int timeout_ms);
00053     virtual int timeout_readv(const struct iovec* iov, int iovcnt,
00054                               int timeout_ms);
00055     virtual int timeout_readall(char* bp, size_t len, int timeout_ms);
00056     virtual int timeout_readvall(const struct iovec* iov, int iovcnt,
00057                                  int timeout_ms);
00058 
00059     virtual int timeout_write(const char* bp, size_t len, int timeout_ms);
00060     virtual int timeout_writev(const struct iovec* iov, int iovcnt,
00061                                int timeout_ms);
00062     virtual int timeout_writeall(const char* bp, size_t len, int timeout_ms);
00063     virtual int timeout_writevall(const struct iovec* iov, int iovcnt,
00064                                   int timeout_ms);
00065 
00066     virtual int get_nonblocking(bool *nonblockingp);
00067     virtual int set_nonblocking(bool nonblocking);
00068 };
00069 
00070 } // namespace oasys
00071 
00072 #endif /* _OASYS_IP_CLIENT_H_ */

Generated on Thu Jun 7 16:56:50 2007 for DTN Reference Implementation by  doxygen 1.5.1