chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.97k stars 1.22k forks source link

Can a socket be closed and reopened later? #1519

Open assafcohen opened 3 months ago

assafcohen commented 3 months ago

I have a socket as class member: I call open as follows:

_socket.open(protocol_t::v4());

when done with it I call close:

_socket.close(ec);

is it possible to call open again, after closing it?

Thanks