datagram_protocol.hpp
Go to the documentation of this file.
00001 //
00002 // datagram_protocol.hpp
00003 // ~~~~~~~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
00012 #define ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/basic_datagram_socket.hpp"
00021 #include "asio/local/basic_endpoint.hpp"
00022 #include "asio/detail/socket_types.hpp"
00023 
00024 #if defined(ASIO_HAS_LOCAL_SOCKETS) \
00025   || defined(GENERATING_DOCUMENTATION)
00026 
00027 namespace asio {
00028 namespace local {
00029 
00031 
00042 class datagram_protocol
00043 {
00044 public:
00046   int type() const
00047   {
00048     return SOCK_DGRAM;
00049   }
00050 
00052   int protocol() const
00053   {
00054     return 0;
00055   }
00056 
00058   int family() const
00059   {
00060     return AF_UNIX;
00061   }
00062 
00064   typedef basic_endpoint<datagram_protocol> endpoint;
00065 
00067   typedef basic_datagram_socket<datagram_protocol> socket;
00068 };
00069 
00070 } // namespace local
00071 } // namespace asio
00072 
00073 #endif // defined(ASIO_HAS_LOCAL_SOCKETS)
00074        //   || defined(GENERATING_DOCUMENTATION)
00075 
00076 #include "asio/detail/pop_options.hpp"
00077 
00078 #endif // ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39