18 Sockets [socket]

18.8 Class template basic_stream_socket [socket.stream]

18.8.1 basic_stream_socket constructors [socket.stream.cons]

explicit basic_stream_socket(io_context& ctx);

Effects: Initializes the base class with basic_socket<Protocol>(ctx).

basic_stream_socket(io_context& ctx, const protocol_type& protocol);

Effects: Initializes the base class with basic_socket<Protocol>(ctx, protocol).

basic_stream_socket(io_context& ctx, const endpoint_type& endpoint);

Effects: Initializes the base class with basic_socket<Protocol>(ctx, endpoint).

basic_stream_socket(io_context& ctx, const protocol_type& protocol, const native_handle_type& native_socket);

Effects: Initializes the base class with basic_socket<Protocol>(ctx, protocol, native_socket).

basic_stream_socket(basic_stream_socket&& rhs);

Effects: Move constructs an object of class basic_stream_socket<Protocol>, initializing the base class with basic_socket<Protocol>(std::move(rhs)).

template<class OtherProtocol> basic_stream_socket(basic_stream_socket<OtherProtocol>&& rhs);

Requires: OtherProtocol is implicitly convertible to Protocol.

Effects: Move constructs an object of class basic_stream_socket<Protocol>, initializing the base class with basic_socket<Protocol>(std::move(rhs)).

Remarks: This constructor shall not participate in overload resolution unless OtherProtocol is implicitly convertible to Protocol.