Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:28

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_ROLE_HPP
0011 #define BOOST_BEAST_ROLE_HPP
0012 
0013 #include <boost/beast/core/detail/config.hpp>
0014 
0015 namespace boost {
0016 namespace beast {
0017 
0018 /** The role of local or remote peer.
0019 
0020     Whether the endpoint is a client or server affects the
0021     behavior of teardown.
0022     The teardown behavior also depends on the type of the stream
0023     being torn down.
0024     
0025     The default implementation of teardown for regular
0026     TCP/IP sockets is as follows:
0027 
0028     @li In the client role, a TCP/IP shutdown is sent after
0029     reading all remaining data on the connection.
0030 
0031     @li In the server role, a TCP/IP shutdown is sent before
0032     reading all remaining data on the connection.
0033 
0034     When the next layer type is a `net::ssl::stream`,
0035     the connection is closed by performing the SSL closing
0036     handshake corresponding to the role type, client or server.
0037 */
0038 enum class role_type
0039 {
0040     /// The stream is operating as a client.
0041     client,
0042 
0043     /// The stream is operating as a server.
0044     server
0045 };
0046 
0047 } // beast
0048 } // boost
0049 
0050 #endif