boost::corosio::tcp_acceptor::open
Create the acceptor socket without binding or listening.
Synopsis
Declared in <boost/corosio/tcp_acceptor.hpp>
void
open(tcp proto = tcp::v4());
Description
Creates a TCP socket with dual‐stack enabled for IPv6. Does not set SO_REUSEADDR — call set_option explicitly if needed.
If the acceptor is already open, this function is a no‐op.
Example
acc.open( tcp::v6() );
acc.set_option( socket_option::reuse_address( true ) );
acc.bind( endpoint( ipv6_address::any(), 8080 ) );
acc.listen();
Parameters
Name |
Description |
proto |
The protocol (IPv4 or IPv6). Defaults to |
See Also
bind, listen
Created with MrDocs