|
Boost Users : |
Subject: Re: [Boost-users] [ASIO] [SSL] [SOCKS4] Layers
From: Bjorn Reese (breese_at_[hidden])
Date: 2014-09-19 07:13:09
On 09/16/2014 09:36 AM, Maciej Miszczak wrote:
> lowest_layer to any of OSI layers). Could someone explain the meaning of
> next_layer and lowest_layer
As you already have inferred, these "layers" have nothing to do with
the OSI model. They refer to types in an inheritance chain; actually,
that is not necessarily true in the general case, but it is an adequate
approximation for understanding them.
lowest_layer() returns a reference to a basic_socket<>, which is the
base class for both basic_stream_socket<> (ip::tcp::socket) and
basic_datagram_socket<> (ip::udp::socket), so you can only use functions
that they have in common.
next_layer() returns a reference to the socket type that you have
wrapped. For ssl::stream<ip::tcp::socket> it returns ip::tcp::socket&.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net