Get the App
SLTechnology News&Howtos  ›  Servers  › 

Basic usage and precautions of boost::asio::streambuf

Shulou Source: shulou.com Published: 2022-06-02 22:53:09 10月04日 Update

Streamsize sgetn (char_type * store,streamsize n) returns n characters under the buffer and stores them in store, and moves the buffer position back n bytes

Code description: originally wanted to constantly get the contents of streambuf through the sgetn function, but did not fully understand the way sgetn got the stream, which led to the problem

Int Teststreambuf ()

{

Boost::asio::streambuf request

Std::ostream request_stream & request)

Request_stream

Tags: Data function loop code location point time first time problem test content pressure server buffer faceted service buffer one-time continuous usage Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Shulou Tech Info Microsoft Huawei