Open the acceptor using the specified protocol.
void open( const protocol_type & protocol = protocol_type());
This function opens the socket acceptor so that it will use the specified protocol.
An object specifying which protocol is to be used.
Thrown on failure.
asio::ip::tcp::acceptor acceptor(io_context); acceptor.open(asio::ip::tcp::v4());