Realistic 3D camera system
3D camera system components
stream_protocol.hpp
Go to the documentation of this file.
1 //
2 // local/stream_protocol.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef ASIO_LOCAL_STREAM_PROTOCOL_HPP
12 #define ASIO_LOCAL_STREAM_PROTOCOL_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if defined(ASIO_HAS_LOCAL_SOCKETS) \
21  || defined(GENERATING_DOCUMENTATION)
22 
28 
30 
31 namespace asio {
32 namespace local {
33 
35 
46 class stream_protocol
47 {
48 public:
50  int type() const
51  {
52  return SOCK_STREAM;
53  }
54 
56  int protocol() const
57  {
58  return 0;
59  }
60 
62  int family() const
63  {
64  return AF_UNIX;
65  }
66 
68  typedef basic_endpoint<stream_protocol> endpoint;
69 
71  typedef basic_stream_socket<stream_protocol> socket;
72 
74  typedef basic_socket_acceptor<stream_protocol> acceptor;
75 
76 #if !defined(ASIO_NO_IOSTREAM)
77  typedef basic_socket_iostream<stream_protocol> iostream;
79 #endif // !defined(ASIO_NO_IOSTREAM)
80 };
81 
82 } // namespace local
83 } // namespace asio
84 
86 
87 #endif // defined(ASIO_HAS_LOCAL_SOCKETS)
88  // || defined(GENERATING_DOCUMENTATION)
89 
90 #endif // ASIO_LOCAL_STREAM_PROTOCOL_HPP
socket_type socket(int af, int type, int protocol, asio::error_code &ec)