Boost logo

Boost :

Subject: Re: [boost] [ASIO] Create SSL stream from native socket?
From: Juraj Ivančić (juraj.ivancic_at_[hidden])
Date: 2010-03-24 12:33:49

On 23.3.2010 13:55, Marcel Fransen wrote:

> I would like to create an ssl stream for an already accepted native socket,
> just like is possible with basic_stream_socket<tcp>.
> How should this be done?

If you already have a tcp::socket you can specify your ssl stream to
use a reference to tcp socket as its first template parameter:

ssl::stream<ip::tcp::socket &> ssl_stream( existing_socket, ... );

Of course, you need to insure that 'ssl_stream' does not outlive


Boost list run by bdawes at, gregod at, cpdaniel at, john at