11 #ifndef ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP 12 #define ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_WINDOWS_RUNTIME) 34 template <
typename Protocol>
35 class winrt_ssocket_service :
36 public winrt_ssocket_service_base
40 typedef Protocol protocol_type;
43 typedef typename Protocol::endpoint endpoint_type;
46 typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
49 struct implementation_type : base_implementation_type
53 : base_implementation_type(),
54 protocol_(endpoint_type().protocol())
59 protocol_type protocol_;
64 : winrt_ssocket_service_base(io_service)
69 void move_construct(implementation_type& impl,
70 implementation_type& other_impl)
72 this->base_move_construct(impl, other_impl);
74 impl.protocol_ = other_impl.protocol_;
75 other_impl.protocol_ = endpoint_type().protocol();
79 void move_assign(implementation_type& impl,
80 winrt_ssocket_service& other_service,
81 implementation_type& other_impl)
83 this->base_move_assign(impl, other_service, other_impl);
85 impl.protocol_ = other_impl.protocol_;
86 other_impl.protocol_ = endpoint_type().protocol();
90 template <
typename Protocol1>
91 void converting_move_construct(implementation_type& impl,
92 typename winrt_ssocket_service<
93 Protocol1>::implementation_type& other_impl)
95 this->base_move_construct(impl, other_impl);
97 impl.protocol_ = protocol_type(other_impl.protocol_);
98 other_impl.protocol_ =
typename Protocol1::endpoint().protocol();
113 impl.socket_ = ref
new Windows::Networking::Sockets::StreamSocket;
114 impl.protocol_ = protocol;
117 catch (Platform::Exception^
e)
128 const protocol_type& protocol,
const native_handle_type& native_socket,
137 impl.socket_ = native_socket;
138 impl.protocol_ = protocol;
153 endpoint_type local_endpoint(
const implementation_type& impl,
156 endpoint_type endpoint;
157 endpoint.resize(do_get_endpoint(impl,
true,
158 endpoint.data(), endpoint.size(), ec));
163 endpoint_type remote_endpoint(
const implementation_type& impl,
166 endpoint_type endpoint;
167 endpoint.resize(do_get_endpoint(impl,
false,
168 endpoint.data(), endpoint.size(), ec));
173 template <
typename Option>
177 return do_set_option(impl, option.level(impl.protocol_),
178 option.name(impl.protocol_), option.data(impl.protocol_),
179 option.size(impl.protocol_), ec);
183 template <
typename Option>
187 std::size_t size = option.size(impl.protocol_);
188 do_get_option(impl, option.level(impl.protocol_),
189 option.name(impl.protocol_),
190 option.data(impl.protocol_), &size, ec);
192 option.resize(impl.protocol_, size);
200 return do_connect(impl, peer_endpoint.data(), ec);
204 template <
typename Handler>
205 void async_connect(implementation_type& impl,
206 const endpoint_type& peer_endpoint, Handler& handler)
212 typedef winrt_socket_connect_op<Handler> op;
213 typename op::ptr p = { asio::detail::addressof(handler),
215 sizeof(op), handler), 0 };
216 p.p =
new (p.v) op(handler);
230 #endif // defined(ASIO_WINDOWS_RUNTIME) 232 #endif // ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP Provides core I/O functionality.
pylon Camera Software Suite for Linux for Use with Basler Gigabit the pylon Viewer and the IP Configurator applications might not be available System I340 and I350 series Although the pylon software will work with any GigE network we would recommend to use one of these adapters USB For U3V devices a USB3 capable USB controller is necessary For best performance and stability we highly recommend a kernel the following settings should be i e
Iterator connect(basic_socket< Protocol, SocketService > &s, Iterator begin)
Establishes a socket connection by trying each endpoint in a sequence.
int bind(socket_type s, const socket_addr_type *addr, std::size_t addrlen, asio::error_code &ec)
bool is_continuation(Context &context)
Class to represent an error code value.
void * allocate(std::size_t s, Handler &h)
ASIO_DECL int open(const char *path, int flags, asio::error_code &ec)
#define ASIO_HANDLER_CREATION(args)
ASIO_DECL const error_category & system_category()
Returns the error category used for the system errors produced by asio.