$search
00001 // 00002 // stream_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_STREAM_PROTOCOL_HPP 00012 #define ASIO_LOCAL_STREAM_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_socket_acceptor.hpp" 00021 #include "asio/basic_socket_iostream.hpp" 00022 #include "asio/basic_stream_socket.hpp" 00023 #include "asio/local/basic_endpoint.hpp" 00024 #include "asio/detail/socket_types.hpp" 00025 00026 #if defined(ASIO_HAS_LOCAL_SOCKETS) \ 00027 || defined(GENERATING_DOCUMENTATION) 00028 00029 namespace asio { 00030 namespace local { 00031 00033 00044 class stream_protocol 00045 { 00046 public: 00048 int type() const 00049 { 00050 return SOCK_STREAM; 00051 } 00052 00054 int protocol() const 00055 { 00056 return 0; 00057 } 00058 00060 int family() const 00061 { 00062 return AF_UNIX; 00063 } 00064 00066 typedef basic_endpoint<stream_protocol> endpoint; 00067 00069 typedef basic_stream_socket<stream_protocol> socket; 00070 00072 typedef basic_socket_acceptor<stream_protocol> acceptor; 00073 00075 typedef basic_socket_iostream<stream_protocol> iostream; 00076 }; 00077 00078 } // namespace local 00079 } // namespace asio 00080 00081 #endif // defined(ASIO_HAS_LOCAL_SOCKETS) 00082 // || defined(GENERATING_DOCUMENTATION) 00083 00084 #include "asio/detail/pop_options.hpp" 00085 00086 #endif // ASIO_LOCAL_STREAM_PROTOCOL_HPP