LCOV - code coverage report
Current view: top level - co - connectionType.h (source / functions) Hit Total Coverage
Test: Collage Lines: 7 12 58.3 %
Date: 2015-11-03 13:48:53 Functions: 1 1 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2013, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *
       4             :  * This file is part of Collage <https://github.com/Eyescale/Collage>
       5             :  *
       6             :  * This library is free software; you can redistribute it and/or modify it under
       7             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       8             :  * by the Free Software Foundation.
       9             :  *
      10             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      11             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      12             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      17             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      18             :  */
      19             : 
      20             : #ifndef CO_CONNECTIONTYPE_H
      21             : #define CO_CONNECTIONTYPE_H
      22             : 
      23             : #include <lunchbox/debug.h>
      24             : #include <iostream>
      25             : 
      26             : namespace co
      27             : {
      28             :     /** The supported network protocols. */
      29             :     enum ConnectionType
      30             :     {
      31             :         CONNECTIONTYPE_NONE = 0,
      32             :         CONNECTIONTYPE_TCPIP,     //!< TCP/IP sockets
      33             :         CONNECTIONTYPE_SDP,       //!< SDP sockets (InfiniBand)
      34             :         CONNECTIONTYPE_PIPE,      //!< pipe() based uni-directional connection
      35             :         CONNECTIONTYPE_NAMEDPIPE, //!< Named pipe based bidirectional connection
      36             :         CONNECTIONTYPE_IB,        //!< @deprecated Win XP Infiniband RDMA
      37             :         CONNECTIONTYPE_RDMA,      //!< Infiniband RDMA CM
      38             :         CONNECTIONTYPE_UDT,       //!< UDT connection
      39             :         CONNECTIONTYPE_MULTICAST = 0x100, //!< @internal MC types after this:
      40             :         CONNECTIONTYPE_RSP        //!< UDP-based reliable stream protocol
      41             :     };
      42             : 
      43             :     /** @internal */
      44         781 :     inline std::ostream& operator << ( std::ostream& os,
      45             :                                        const ConnectionType& type )
      46             :     {
      47         781 :         switch( type )
      48             :         {
      49         770 :             case CONNECTIONTYPE_TCPIP: return os << "TCPIP";
      50           0 :             case CONNECTIONTYPE_SDP: return os << "SDP";
      51           3 :             case CONNECTIONTYPE_PIPE: return os << "ANON_PIPE";
      52           2 :             case CONNECTIONTYPE_NAMEDPIPE: return os << "PIPE";
      53           3 :             case CONNECTIONTYPE_RSP: return os << "RSP";
      54           0 :             case CONNECTIONTYPE_NONE: return os << "NONE";
      55           3 :             case CONNECTIONTYPE_RDMA: return os << "RDMA";
      56           0 :             case CONNECTIONTYPE_UDT: return os << "UDT";
      57             : 
      58             :             default:
      59           0 :                 LBASSERTINFO( false, "Not implemented" );
      60           0 :                 return os << "ERROR";
      61             :         }
      62             :         return os;
      63             :     }
      64             : }
      65             : 
      66             : #endif // CO_CONNECTIONTYPE_H

Generated by: LCOV version 1.11