24 lines
744 B
C++
24 lines
744 B
C++
#pragma once
|
|
#include <boost/asio.hpp>
|
|
|
|
namespace seq_packet
|
|
{
|
|
using namespace boost::asio::local;
|
|
|
|
struct seqpacket_protocol
|
|
{
|
|
int type() const { return SOCK_SEQPACKET; }
|
|
int protocol() const { return 0; }
|
|
int family() const { return AF_UNIX; }
|
|
|
|
using endpoint = basic_endpoint<seqpacket_protocol>;
|
|
using socket = boost::asio::basic_stream_socket<seqpacket_protocol>;
|
|
using acceptor = boost::asio::basic_socket_acceptor<seqpacket_protocol>;
|
|
|
|
#if !defined(BOOST_ASIO_NO_IOSTREAM)
|
|
/// The UNIX domain iostream type.
|
|
typedef boost::asio::basic_socket_iostream<seqpacket_protocol> iostream;
|
|
#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
|
|
};
|
|
}
|