Remove all public references to EventLoop to match changes to async API
This commit is contained in:
@@ -5,20 +5,15 @@ import test_capnp
|
||||
import socket
|
||||
|
||||
def example_client():
|
||||
loop = capnp.EventLoop()
|
||||
|
||||
c = socket.create_connection(('localhost', 49999))
|
||||
read_stream = capnp.FdAsyncIoStream(c.fileno())
|
||||
|
||||
client = capnp.RpcClient(loop, read_stream)
|
||||
client = capnp.RpcClient(c)
|
||||
|
||||
ref = test_capnp.TestSturdyRefObjectId.new_message()
|
||||
ref.tag = 'testInterface'
|
||||
cap = client.restore(ref)
|
||||
cap = client.restore(test_capnp.TestSturdyRefObjectId.new_message(tag='testInterface'))
|
||||
cap = cap.cast_as(test_capnp.TestInterface)
|
||||
|
||||
remote = cap.foo(i=5)
|
||||
response = loop.wait(remote)
|
||||
response = remote.wait()
|
||||
|
||||
assert response.x == '125'
|
||||
c.close()
|
||||
|
||||
Reference in New Issue
Block a user