S
S
Saharman2021-09-28 19:21:50
C++ / C#
Saharman, 2021-09-28 19:21:50

How to raise the server inside the connection?

Good evening!
I took the code exactly from the boost documentation https://www.boost.org/doc/libs/1_77_0/doc/html/boo...
I need to modify it so that from the do_read() function I can raise the second server on an arbitrary port , which could then turn itself off and report this to the connection from which it was called.
Unfortunately, you cannot add a server to an io_context that is already running.
I also tried to create a server with a new instance of io_context in another thread, but it didn't work either.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question