Questions tagged [capnproto]

Cap'n Proto is a zero-copy data interchange format described by a schema language not unlike Protobuf, and an associated capability-based RPC system.

Cap'n Proto is a zero-copy serialization format described by a schema language not unlike Protobuf and an associated capability-based RPC system.

99 questions
0
votes
1 answer

How to declare a CAPnPROTO builder before initialzing it in c++?

I am new to CAP'N PROTO. I have created cap'n proto a structure and part of structure mentioned below: **struct InjectorRequestMsg { dataFrame @0: InjectorDataFrame; injectorRequestID @1: UInt32; injectorID @2: UInt32; injectorScriptPath @3:…
Biswojit
  • 1
  • 3
0
votes
1 answer

Run function periodically in Cap'n Proto RPC server

I have a Cap'n Proto RPC server that runs some OpenGL commands in a window. I am not interested in the window's events at all, but in order to avoid getting killed on Windows I need to poll events once a second or so. How can I do this in a simple…
Joonazan
  • 1,408
  • 10
  • 18
0
votes
1 answer

Need help creating and installing capnpc-java (CapnProto for Java)

I have a project requiring the use of Cap'n Proto for Java. I have a Linux system and I've successfully installed the Cap'n Proto schema compiler as described here: https://capnproto.org/install.html Now following the installation instructions as…
spring.ace
  • 141
  • 1
  • 9
0
votes
1 answer

Forward declarations in CapnProto

In a CapnProto schema is there any way to forward-declare structs so you can make a tree structure like this: struct ExecuteProgram { code @0 :Text; } struct SequenceProgram { programs @0 :List(Program) } struct IfProgram { condition @1…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
0
votes
1 answer

Cap'n Proto - De-/Serialize struct to/from std::string for storing in LevelDB

I want to store some Capnproto struct in a LevelDB, so I have to serialize it to string and deserialize it back from a std::string later. Currently, I play around with the following (adapted from here:…
dvs23
  • 127
  • 10
0
votes
1 answer

Capnproto - Make client request in server callback

I need to do some client-requests inside a server-callback and are not sure where to store the created capnp::EzRpcClient and CompareNetwork::Client comparer objects. That's because the clients go out of scope (I think - I just get a SEGFAULT, but…
dvs23
  • 127
  • 10
0
votes
1 answer

Sending Cap'n Proto messages over TCP in C++

I'm totally new to networking and just started to use Cap'n Proto too. This is some sample program from here: void writeAddressBook(int fd) { ::capnp::MallocMessageBuilder message; AddressBook::Builder addressBook =…
Andariel
  • 9
  • 1
  • 3
0
votes
1 answer

[CapNProto][pycapnp] Struct Send Server

How do I send a server a struct? I tried: import socket import sys import capnp import select import test_capnp class Test: def __init__(self, serverAddr="127.0.0.1", serverPort = 10000): self.serverAddress = (serverAddr, serverPort) …
Locu
  • 1
  • 1
0
votes
1 answer

Reading/writing Cap’n Proto messages partially

I'm trying to use Cap’n Proto in existing project consisting of client and server communicating over UDS. I don't have the resources (and I doubt it would be accepted) to redo all client-server RPC, but I wanted to benefit from Cap’n Proto…
zoska
  • 1,684
  • 11
  • 23
0
votes
0 answers

Capnproto D language Print all data in a file

I downloaded the capnproto for dlanguage and started tinkering the sample-addressbook.. My problem is, everytime I add a person to the addressbook, it still prints only one of the data in the file, instead of the whole file.. void…
Tomas
  • 33
  • 4
0
votes
1 answer

Why dont I need to use AnyPointer::initAs in capnproto?

I'm just starting out experimenting with cap'n proto and trying to improve my understanding. Right now I'm trying to work out how best to use AnyPointer and whilst experimenting I noticed that I didn't seem to need to call initAs for my object and…
David Woo
  • 749
  • 4
  • 13
0
votes
1 answer

Error: pip install pycapnp

I've been trying to install pycapnp via pip on my macbook pro. But I seem to be having issues trying to download it. The following is the error: warning: "Your compiler supports C++11 but your C++ standard library does not. If your " …
modin3956
  • 149
  • 2
  • 11
0
votes
1 answer

Cap'n Proto CMake support: CAPNP_LIB_CAPNP-JSON is NOTFOUND

Why do I have to set set(CAPNP_LIB_CAPNP-JSON "") in my CMakeLists.txt in order to not get an error? Error as follows: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are…
seeekr
  • 101
  • 1
  • 9
0
votes
2 answers

Unable to send capnp messages over ZMQ

I have the following code and I am trying to send a capnp message over ZMQ: ::capnp::MallocMessageBuilder message; Guitar::Builder guitar = message.initRoot(); guitar.setModel(1); guitar.setPrice(1200); kj::Array
nik
  • 1
0
votes
1 answer

Java RPC library with capnproto?

Currently the capnproto uber-fast library doesn't provide an RPC library, which makes it difficult to replace existing GRPCio (Or other RPC java frameworks). Why the capnproto Java support is currently limited only to serialisation? Are there plans…
Valerio Schiavoni
  • 1,373
  • 1
  • 12
  • 19