Remove all public references to EventLoop to match changes to async API

This commit is contained in:
Jason Paryani
2013-12-02 17:38:32 -08:00
parent d1de275187
commit 888b906781
11 changed files with 168 additions and 195 deletions

View File

@@ -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()