Websocket example
Hello,
Boost=1.84.0, BOOST_BEAST_VERSION=351
I am using boost/beast websocket TLS async client example link. I noticed my connection disconnects sometimes with stream truncated and eof. What do these errors mean? I checked my internet connection with wireshark and it's fine.
Do they happen at the end of stream? error::stream_truncated
No, i get these errors without calling any shutdown or disconnect function. And it shows when use client for high load traffic (high frequency).
Are you sure it’s not the server that dropped the connection? Does this happen with just one specific server?
Can connection issues occur if multiply connections use load_certificates function?
Do you mean load_root_certificates? it calls ssl::context::add_certificate_authority which is not thread safe.
I made n threads. Every thread has its own asio context, and interact with the same internet resource
Do they have their own ssl::context too?
yes
Have you tried reducing your application to a single connection and a single thread to see if the issue still exists? If possible, test one of the existing examples.