Changeset 44674


Ignore:
Timestamp:
Apr 21, 2008, 4:43:05 AM (10 years ago)
Author:
chris_kohlhoff
Message:

Add support for UNIX domain sockets.

Location:
trunk
Files:
10 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/asio.hpp

    r43472 r44674  
    5959#include <boost/asio/is_read_buffered.hpp>
    6060#include <boost/asio/is_write_buffered.hpp>
     61#include <boost/asio/local/basic_endpoint.hpp>
     62#include <boost/asio/local/connect_pair.hpp>
     63#include <boost/asio/local/datagram_protocol.hpp>
     64#include <boost/asio/local/stream_protocol.hpp>
    6165#include <boost/asio/placeholders.hpp>
    6266#include <boost/asio/read.hpp>
  • trunk/boost/asio/detail/socket_ops.hpp

    r43570 r44674  
    175175#endif
    176176  return result;
     177}
     178
     179inline int socketpair(int af, int type, int protocol,
     180    socket_type sv[2], boost::system::error_code& ec)
     181{
     182#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
     183  ec = boost::asio::error::operation_not_supported;
     184  return -1;
     185#else
     186  clear_error(ec);
     187  return error_wrapper(::socketpair(af, type, protocol, sv), ec);
     188#endif
    177189}
    178190
  • trunk/boost/asio/detail/socket_types.hpp

    r43472 r44674  
    100100# include <sys/socket.h>
    101101# include <sys/uio.h>
     102# include <sys/un.h>
    102103# include <netinet/in.h>
    103104# include <netinet/tcp.h>
     
    177178typedef sockaddr_in6 sockaddr_in6_type;
    178179typedef sockaddr_storage sockaddr_storage_type;
     180typedef sockaddr_un sockaddr_un_type;
    179181typedef addrinfo addrinfo_type;
    180182typedef int ioctl_arg_type;
  • trunk/boost/asio/error.hpp

    r43472 r44674  
    107107  message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE),
    108108
     109  /// The name was too long.
     110  name_too_long = BOOST_ASIO_SOCKET_ERROR(ENAMETOOLONG),
     111
    109112  /// Network is down.
    110113  network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN),
  • trunk/libs/asio/test/Jamfile

    r43473 r44674  
    7070  [ run is_read_buffered.cpp <template>asio_unit_test ]
    7171  [ run is_write_buffered.cpp <template>asio_unit_test ]
     72  [ run local/basic_endpoint.cpp <template>asio_unit_test ]
     73  [ run local/connect_pair.cpp <template>asio_unit_test ]
     74  [ run local/datagram_protocol.cpp <template>asio_unit_test ]
     75  [ run local/stream_protocol.cpp <template>asio_unit_test ]
    7276  [ run placeholders.cpp <template>asio_unit_test ]
    7377  [ run read.cpp <template>asio_unit_test ]
  • trunk/libs/asio/test/Jamfile.v2

    r43473 r44674  
    117117  [ run is_write_buffered.cpp ]
    118118  [ run is_write_buffered.cpp : : : $(USE_SELECT) : is_write_buffered_select ]
     119  [ link local/basic_endpoint.cpp : : local_basic_endpoint ]
     120  [ link local/basic_endpoint.cpp : $(USE_SELECT) : local_basic_endpoint_select ]
     121  [ link local/connect_pair.cpp : : local_connect_pair ]
     122  [ link local/connect_pair.cpp : $(USE_SELECT) : local_connect_pair_select ]
     123  [ link local/datagram_protocol.cpp : : local_datagram_protocol ]
     124  [ link local/datagram_protocol.cpp : $(USE_SELECT) : local_datagram_protocol_select ]
     125  [ link local/stream_protocol.cpp : : local_stream_protocol ]
     126  [ link local/stream_protocol.cpp : $(USE_SELECT) : local_stream_protocol_select ]
    119127  [ link placeholders.cpp ]
    120128  [ link placeholders.cpp : $(USE_SELECT) : placeholders_select ]
Note: See TracChangeset for help on using the changeset viewer.