Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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 }
00071 }
00072
00073 #endif // defined(ASIO_HAS_LOCAL_SOCKETS)
00074
00075
00076 #include "asio/detail/pop_options.hpp"
00077
00078 #endif // ASIO_LOCAL_DATAGRAM_PROTOCOL_HPP