conexus logo

ipv6_tcp.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the conexus library.                             *
00006  *                                                                         *
00007  *   The conexus library is free software; you can redistribute it and/or  *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The conexus library is distributed in the hope that it will be        *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef CONEXUS_IPV6TCP_H
00020 #define CONEXUS_IPV6TCP_H
00021 
00022 #include <conexus/ipv6_ip.h>
00023 
00032 namespace Conexus
00033 {
00034 
00035   namespace IPv6
00036   {
00037 
00045     class TCP : public IP
00046     {
00047 
00048       protected:
00049 
00050         friend class TCPServer;
00051 
00052         TCP( uint32_t host, uint16_t port );
00053 
00054         TCP( const struct in6_addr& host=in6addr_any, uint16_t port=0 );
00055 
00056         TCP( const std::string& host, uint16_t port );
00057 
00058       public:
00059 
00060         typedef ConexusPointer<TCP> pointer;
00061 
00062         CONEXUS_ENDPOINT_GENERIC_CREATE();
00063 
00064         static pointer create( uint16_t port = 0 );
00065 
00066         static pointer create( uint32_t host, uint16_t port );
00067 
00068         static pointer create( const struct in6_addr& host, uint16_t port=0 );
00069 
00070         static pointer create( const std::string& host, uint16_t port=0 );
00071 
00072         virtual ~TCP() throw();
00073 
00080         virtual bool shutdown( ReadWrite read_write=READ_WRITE );
00081 
00082 
00083         virtual size_t input_available() throw();
00084 
00088         int pending_output_size();
00089 
00090       protected:
00091 
00096         TCP( int accepted_fd, bool );
00097 
00098         static TCP::pointer create( int accepted_fd, bool );
00099 
00100         virtual void on_local_address_changed( );
00101         virtual void on_remote_address_changed( );
00102 
00107         virtual size_t write_data( const Data data, Timeout timeout ) throw ( write_exception );
00108 
00109     };
00110 
00111   }
00112 
00113 }
00114 
00115 #endif

Generated on Wed Jul 8 15:50:07 2009 for conexus by doxygen 1.5.8