0

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)
        capnp.remove_import_hook()
        self.setupClient()

    def setupClient(self):
        _socket = socket.socket()
        _socket.connect(self.serverAddress)
        client = capnp.TwoPartyClient(_socket)
        send = client.bootstrap().cast_as(capnp._DynamicCapabilityClient(test_capnp))

Test.capnp:

struct Test {
     id @0 : UInt8;
     msg @1 : Text;
}

Furthermore, how can I give values ​​to the Test? Thanks for helping :)

Locu
  • 1
  • 1

1 Answers1

-1

lol have you proceed to the second turn of the competition?