$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Asio]What's the behavior of socket.async_write()after socket.close() is called?
From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2010-06-07 05:58:52
On Mon, Jun 7, 2010 at 6:54 AM, Igor R <boost.lists_at_[hidden]> wrote:
>> bad designed api.
>> close() does not need to be public -- it belongs into the destructor.
>
> Usually socket destruction is the consequence of its closing.
> How would you emulate the following scheme, if it wouldn't be possible
> to close a socket?
You would destroy the socket. Delete'ing it, or using a boost::optional.
[snipped example]
Regards,
-- Felipe Magno de Almeida