boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
250 stars 32 forks source link

I think C++20 async can use concepts to replace Boost.Asio, which will allow users to use other network librarie/coroutien scheduler. #243

Closed sxstd001 closed 5 months ago

sxstd001 commented 5 months ago

like this, use some concepts instead Boost.Asio

    template<class T>
    concept TcpConn= requires(T t, char* buf, int num, int offset){
        co_await t.read(buf, num);
        co_await  t.read(buf, num, offset);
        co_await  t.write(buf, num);
             co_await  t.close();
            t.nowaitClose();
           co_await   t.connect....
              ..........
    };
anarthal commented 5 months ago

I'm afraid I'm not following - is this a feature request to implement a new, coroutine-only, network-library agnostic interface for this library? Could you please elaborate on your requirements (what coroutine library/scheduler would you want to use, which kind of application would you be using the library for...)?

The issue title says "replace", but the minimum C++ required for this library is C++11 - so the best we can do is to "add" a new interface.

Regards, Ruben.