ASIO_SYNC_OP_VOID context::set_password_callback( PasswordCallback callback, asio::error_code& ec) { do_set_password_callback( new detail::password_callback<PasswordCallback>(callback), ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Assign an existing native descriptor to a stream descriptor. ASIO_SYNC_OP_VOID assign(implementation_type& impl, const native_handle_type& native_descriptor, asio::error_code& ec) { service_impl_.assign(impl, native_descriptor, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
ASIO_SYNC_OP_VOID context::set_verify_callback( VerifyCallback callback, asio::error_code& ec) { do_set_verify_callback( new detail::verify_callback<VerifyCallback>(callback), ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/* * This function opens the serial port to hold an existing native serial port. * * @param native_serial_port A native serial port. * * @param ec Set to indicate what error occurred, if any. */ ASIO_SYNC_OP_VOID assign(const native_handle_type& native_serial_port, asio::error_code& ec) { this->get_service().assign(this->get_implementation(), native_serial_port, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
inline ASIO_SYNC_OP_VOID connect_pair( basic_socket<Protocol ASIO_SVC_TARG>& socket1, basic_socket<Protocol ASIO_SVC_TARG1>& socket2, asio::error_code& ec) { // Check that this function is only being used with a UNIX domain socket. asio::local::basic_endpoint<Protocol>* tmp = static_cast<typename Protocol::endpoint*>(0); (void)tmp; Protocol protocol; asio::detail::socket_type sv[2]; if (asio::detail::socket_ops::socketpair(protocol.family(), protocol.type(), protocol.protocol(), sv, ec) == asio::detail::socket_error_retval) ASIO_SYNC_OP_VOID_RETURN(ec); socket1.assign(protocol, sv[0], ec); if (ec) { asio::error_code temp_ec; asio::detail::socket_ops::state_type state[2] = { 0, 0 }; asio::detail::socket_ops::close(sv[0], state[0], true, temp_ec); asio::detail::socket_ops::close(sv[1], state[1], true, temp_ec); ASIO_SYNC_OP_VOID_RETURN(ec); } socket2.assign(protocol, sv[1], ec); if (ec) { asio::error_code temp_ec; socket1.close(temp_ec); asio::detail::socket_ops::state_type state = 0; asio::detail::socket_ops::close(sv[1], state, true, temp_ec); ASIO_SYNC_OP_VOID_RETURN(ec); } ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Close the stream. ASIO_SYNC_OP_VOID close(asio::error_code& ec) { next_layer_.close(ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/** * This function forces the completion of any pending asynchronous wait * operations against the signal set. The handler for each cancelled * operation will be invoked with the asio::error::operation_aborted * error code. * * Cancellation does not alter the set of registered signals. * * @param ec Set to indicate what error occurred, if any. * * @note If a registered signal occurred before cancel() is called, then the * handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ ASIO_SYNC_OP_VOID cancel(asio::error_code& ec) { this->get_service().cancel(this->get_implementation(), ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/** * This function removes the specified signal from the set. It has no effect * if the signal is not in the set. * * @param signal_number The signal to be removed from the set. * * @param ec Set to indicate what error occurred, if any. * * @note Removes any notifications that have been queued for the specified * signal number. */ ASIO_SYNC_OP_VOID remove(int signal_number, asio::error_code& ec) { this->get_service().remove(this->get_implementation(), signal_number, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Close the stream. ASIO_SYNC_OP_VOID close(asio::error_code& ec) { stream_impl_.close(ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Cancel all asynchronous operations associated with the handle. ASIO_SYNC_OP_VOID cancel(implementation_type& impl, asio::error_code& ec) { service_impl_.cancel(impl, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option, asio::error_code& ec) { this->get_service().get_option(this->get_implementation(), option, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/** * This function causes a break sequence of platform-specific duration to be * sent out the serial port. * * @param ec Set to indicate what error occurred, if any. */ ASIO_SYNC_OP_VOID send_break(asio::error_code& ec) { this->get_service().send_break(this->get_implementation(), ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/** * This function opens the serial port using the given platform-specific * device name. * * @param device The platform-specific device name. * * @param ec Set the indicate what error occurred, if any. */ ASIO_SYNC_OP_VOID open(const std::string& device, asio::error_code& ec) { this->get_service().open(this->get_implementation(), device, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Wait for the descriptor to become ready to read, ready to write, or to /// have pending error conditions. ASIO_SYNC_OP_VOID wait(implementation_type& impl, descriptor_base::wait_type w, asio::error_code& ec) { service_impl_.wait(impl, w, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
/// Sets the non-blocking mode of the native descriptor implementation. ASIO_SYNC_OP_VOID native_non_blocking(implementation_type& impl, bool mode, asio::error_code& ec) { service_impl_.native_non_blocking(impl, mode, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }
ASIO_SYNC_OP_VOID io_control(implementation_type& impl, IoControlCommand& command, asio::error_code& ec) { service_impl_.io_control(impl, command, ec); ASIO_SYNC_OP_VOID_RETURN(ec); }