serverbox icon indicating copy to clipboard operation
serverbox copied to clipboard

Support C++20 coroutines in IOCore

Open Gerold103 opened this issue 1 year ago • 0 comments

Related to #3. Investigate:

  • Whether can support them in TCPSocketIFace directly and automatically in TCPSocket/SSLSocket. For example, as new send and receive method overloads which would return awaitable futures.
  • Otherwise try to wrap TCPSocketIFace into new coroutine-friendly classes like TCPSocketCoro/SSLSocketCoro. These wouldn't have any callbacks or subscriptions on the outside. They would only return awaitable objects which in turn after resume would return the result. The machinery of propagating async responses and errors into await's result would be done under the hood, using the good old TCPSocketSubscription.

All same for the TCPServer.

Gerold103 avatar Mar 06 '24 21:03 Gerold103