Allow reading and writing messages from sockets in async mode

This commit is contained in:
Lasse Blaauwbroek
2023-04-20 23:58:53 +02:00
committed by Jacob Alexander
parent d53aa24733
commit 8feb377217
7 changed files with 201 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
#include "capnp/dynamic.h"
#include <kj/async-io.h>
#include <capnp/serialize-async.h>
#include <stdexcept>
#include "Python.h"
@@ -147,4 +148,6 @@ inline kj::Exception makeException(kj::StringPtr message) {
kj::Promise<void> taskToPromise(kj::Own<PyRefCounter> coroutine, PyObject* callback);
::kj::Promise<kj::Own<PyRefCounter>> tryReadMessage(kj::AsyncIoStream& stream, capnp::ReaderOptions opts);
void init_capnp_api();