Archived
This forum has been archived. Please start a new discussion on GitHub.
Multiple Connection to the same Glacier with python
in Help Center
Hi!
I read thread about Multiple Connection to the same Glacier and I try repeat it with python.
I write simple server application with empty ack() method, start glacier2.
First, I try to use one connection to router, but with custom Connection object:
Then I try to call server:
But glacier2 tell that no session defined for connection.
I dump network connections, and when client call server.ack() Ice use different network connection (different client's tcp port).
What I do wrong?
I read thread about Multiple Connection to the same Glacier and I try repeat it with python.
I write simple server application with empty ack() method, start glacier2.
First, I try to use one connection to router, but with custom Connection object:
defaultRouter = ic.getDefaultRouter() router1 = Glacier2.RouterPrx.uncheckedCast(defaultRouter.ice_connectionId('first')) base = router1.createSession('test', '') # Xmm: In python base object here is None, but glacier here create the sesions successfuly
Then I try to call server:
server = Test.ServerPrx.uncheckedCast(ic.stringToProxy('Server:default -p 10000')) server = server.ice_router(router1) server.ack()
But glacier2 tell that no session defined for connection.
I dump network connections, and when client call server.ack() Ice use different network connection (different client's tcp port).
What I do wrong?
0
Comments
-
Hi,
You also need to override the connection Id on the server proxy, try with:server = server.ice_connectionId("first").ice_router(router1) server.ack()
Cheers,
Benoit.0