| 1 | Index: boost/asio/detail/reactive_socket_service.hpp
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- boost/asio/detail/reactive_socket_service.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 4 | +++ boost/asio/detail/reactive_socket_service.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 5 | 267c267,269
|
|---|
| 6 | < flags, sender_endpoint.data(), &addr_len, ec);
|
|---|
| 7 | ---
|
|---|
| 8 | > flags, sender_endpoint.data(), &addr_len,
|
|---|
| 9 | > sender_endpoint.control(), sender_endpoint.control_size(),
|
|---|
| 10 | > ec);
|
|---|
| 11 | Index: boost/asio/detail/socket_ops.hpp
|
|---|
| 12 | ===================================================================
|
|---|
| 13 | --- boost/asio/detail/socket_ops.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 14 | +++ boost/asio/detail/socket_ops.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 15 | 154c154,155
|
|---|
| 16 | < std::size_t* addrlen, boost::system::error_code& ec);
|
|---|
| 17 | ---
|
|---|
| 18 | > std::size_t* addrlen, void* control, std::size_t controllen,
|
|---|
| 19 | > boost::system::error_code& ec);
|
|---|
| 20 | 158c159,160
|
|---|
| 21 | < std::size_t* addrlen, boost::system::error_code& ec);
|
|---|
| 22 | ---
|
|---|
| 23 | > std::size_t* addrlen, void* control, std::size_t controllen,
|
|---|
| 24 | > boost::system::error_code& ec);
|
|---|
| 25 | Index: boost/asio/ip/detail/endpoint.hpp
|
|---|
| 26 | ===================================================================
|
|---|
| 27 | --- boost/asio/ip/detail/endpoint.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 28 | +++ boost/asio/ip/detail/endpoint.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 29 | 79a80,120
|
|---|
| 30 | > /// Get the underlying endpoint's first control header for recvfrom calls.
|
|---|
| 31 | > const struct cmsghdr* control_header_first() const
|
|---|
| 32 | > {
|
|---|
| 33 | > return CMSG_FIRSTHDR(control_.msg());
|
|---|
| 34 | > }
|
|---|
| 35 | >
|
|---|
| 36 | > /// Get the underlying endpoint's next control header for recvfrom calls.
|
|---|
| 37 | > const struct cmsghdr* control_header_next(const cmsghdr* prev) const
|
|---|
| 38 | > {
|
|---|
| 39 | > return static_cast<const struct cmsghdr*>(
|
|---|
| 40 | > CMSG_NXTHDR(const_cast<struct msghdr*>(control_.msg()),
|
|---|
| 41 | > const_cast<struct cmsghdr*>(prev)));
|
|---|
| 42 | > }
|
|---|
| 43 | >
|
|---|
| 44 | > /// Get the underlying size of the endpoint's buffer used to store
|
|---|
| 45 | > /// control messages.
|
|---|
| 46 | > template <typename T>
|
|---|
| 47 | > T control_msg_data(const struct cmsghdr* cmsg) const
|
|---|
| 48 | > {
|
|---|
| 49 | > return reinterpret_cast<T>(CMSG_DATA(cmsg));
|
|---|
| 50 | > }
|
|---|
| 51 | >
|
|---|
| 52 | > /// Get the underlying endpoint's control message given its header.
|
|---|
| 53 | > void* control_msg() const
|
|---|
| 54 | > {
|
|---|
| 55 | > return control_.msg()->msg_control;
|
|---|
| 56 | > }
|
|---|
| 57 | >
|
|---|
| 58 | > /// Get the underlying size of the endpoint's buffer used to store
|
|---|
| 59 | > /// control messages.
|
|---|
| 60 | > std::size_t control_size() const
|
|---|
| 61 | > {
|
|---|
| 62 | > return control_.msg()->msg_controllen;
|
|---|
| 63 | > }
|
|---|
| 64 | >
|
|---|
| 65 | > /// Set the size of the buffer used for storing control message.
|
|---|
| 66 | > void control_size(size_t size)
|
|---|
| 67 | > {
|
|---|
| 68 | > control_.allocate(size);
|
|---|
| 69 | > }
|
|---|
| 70 | >
|
|---|
| 71 | 127a169,198
|
|---|
| 72 | >
|
|---|
| 73 | > // Space for control message for receive
|
|---|
| 74 | > struct control
|
|---|
| 75 | > {
|
|---|
| 76 | > control()
|
|---|
| 77 | > {
|
|---|
| 78 | > memset(&msg_, 0, sizeof(msghdr));
|
|---|
| 79 | > }
|
|---|
| 80 | > ~control()
|
|---|
| 81 | > {
|
|---|
| 82 | > allocate(0);
|
|---|
| 83 | > }
|
|---|
| 84 | > void allocate(size_t sz)
|
|---|
| 85 | > {
|
|---|
| 86 | > if (msg_.msg_control)
|
|---|
| 87 | > delete [] (char*)msg_.msg_control;
|
|---|
| 88 | > if (sz == 0)
|
|---|
| 89 | > return;
|
|---|
| 90 | > size_t n = sz > sizeof(struct cmsghdr) ? sz : sizeof(struct cmsghdr)+128;
|
|---|
| 91 | > msg_.msg_control = new char[n];
|
|---|
| 92 | > msg_.msg_controllen = n;
|
|---|
| 93 | > memset(msg_.msg_control, 0, n);
|
|---|
| 94 | > }
|
|---|
| 95 | >
|
|---|
| 96 | > const msghdr* msg() const { return &msg_; }
|
|---|
| 97 | > const cmsghdr* cmsg() const { return static_cast<const cmsghdr*>(msg_.msg_control); }
|
|---|
| 98 | > size_t cmsg_len() { return msg_.msg_controllen; }
|
|---|
| 99 | > private:
|
|---|
| 100 | > msghdr msg_;
|
|---|
| 101 | > } control_;
|
|---|
| 102 | Index: boost/asio/detail/win_iocp_socket_service.hpp
|
|---|
| 103 | ===================================================================
|
|---|
| 104 | --- boost/asio/detail/win_iocp_socket_service.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 105 | +++ boost/asio/detail/win_iocp_socket_service.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 106 | 347c347
|
|---|
| 107 | < flags, sender_endpoint.data(), &addr_len, ec);
|
|---|
| 108 | ---
|
|---|
| 109 | > flags, sender_endpoint.data(), &addr_len, NULL, 0, ec);
|
|---|
| 110 | Index: boost/asio/ip/basic_endpoint.hpp
|
|---|
| 111 | ===================================================================
|
|---|
| 112 | --- boost/asio/ip/basic_endpoint.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 113 | +++ boost/asio/ip/basic_endpoint.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 114 | 156a157,195
|
|---|
| 115 | > /// Get the underlying endpoint's first control header for recvfrom calls.
|
|---|
| 116 | > const struct cmsghdr* control_header_first() const
|
|---|
| 117 | > {
|
|---|
| 118 | > return impl_.control_header_first();
|
|---|
| 119 | > }
|
|---|
| 120 | >
|
|---|
| 121 | > /// Get the underlying endpoint's next control header for recvfrom calls.
|
|---|
| 122 | > const struct cmsghdr* control_header_next(const cmsghdr* prev) const
|
|---|
| 123 | > {
|
|---|
| 124 | > return impl_.control_header_next(prev);
|
|---|
| 125 | > }
|
|---|
| 126 | >
|
|---|
| 127 | > /// Get the underlying size of the endpoint's buffer used to store
|
|---|
| 128 | > /// control messages.
|
|---|
| 129 | > template <typename T>
|
|---|
| 130 | > T control_msg_data(const struct cmsghdr* cmsg) const
|
|---|
| 131 | > {
|
|---|
| 132 | > return impl_.control_msg_data<T>(cmsg);
|
|---|
| 133 | > }
|
|---|
| 134 | >
|
|---|
| 135 | > /// Get the underlying endpoint's control message given its header.
|
|---|
| 136 | > void* control_msg() const
|
|---|
| 137 | > {
|
|---|
| 138 | > return impl_.control_msg();
|
|---|
| 139 | > }
|
|---|
| 140 | >
|
|---|
| 141 | > /// Get the underlying size of the endpoint's buffer used to store
|
|---|
| 142 | > /// control messages.
|
|---|
| 143 | > std::size_t control_size() const
|
|---|
| 144 | > {
|
|---|
| 145 | > return impl_.control_size();
|
|---|
| 146 | > }
|
|---|
| 147 | >
|
|---|
| 148 | > /// Set the size of the buffer used for storing control message.
|
|---|
| 149 | > void control_size(size_t size)
|
|---|
| 150 | > {
|
|---|
| 151 | > impl_.control_size(size);
|
|---|
| 152 | > }
|
|---|
| 153 | >
|
|---|
| 154 | Index: boost/asio/detail/impl/socket_ops.ipp
|
|---|
| 155 | ===================================================================
|
|---|
| 156 | --- boost/asio/detail/impl/socket_ops.ipp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 157 | +++ boost/asio/detail/impl/socket_ops.ipp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 158 | 819a820
|
|---|
| 159 | > void* control, std::size_t controllen,
|
|---|
| 160 | 845a847,850
|
|---|
| 161 | > if (controllen > 0) {
|
|---|
| 162 | > msg.msg_control = control;
|
|---|
| 163 | > msg.msg_controllen = controllen;
|
|---|
| 164 | > }
|
|---|
| 165 | 856c861,863
|
|---|
| 166 | < std::size_t* addrlen, boost::system::error_code& ec)
|
|---|
| 167 | ---
|
|---|
| 168 | > std::size_t* addrlen,
|
|---|
| 169 | > void* control, std::size_t controllen,
|
|---|
| 170 | > boost::system::error_code& ec)
|
|---|
| 171 | 869c876
|
|---|
| 172 | < s, bufs, count, flags, addr, addrlen, ec);
|
|---|
| 173 | ---
|
|---|
| 174 | > s, bufs, count, flags, addr, addrlen, control, controllen, ec);
|
|---|
| 175 | 918c925
|
|---|
| 176 | < s, bufs, count, flags, addr, addrlen, ec);
|
|---|
| 177 | ---
|
|---|
| 178 | > s, bufs, count, flags, addr, addrlen, control, controllen, ec);
|
|---|
| 179 | Index: boost/asio/detail/reactive_socket_recvfrom_op.hpp
|
|---|
| 180 | ===================================================================
|
|---|
| 181 | --- boost/asio/detail/reactive_socket_recvfrom_op.hpp 2014-11-02 00:00:00.000000000 -0600
|
|---|
| 182 | +++ boost/asio/detail/reactive_socket_recvfrom_op.hpp 2014-11-02 01:00:00.000000000 -0600
|
|---|
| 183 | 59a60
|
|---|
| 184 | > o->sender_endpoint_.control_msg(), o->sender_endpoint_.control_size(),
|
|---|