1 # **********************************************************************
3 # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 # This copy of Ice is licensed to you under the terms described in the
6 # ICE_LICENSE file included in this distribution.
8 # **********************************************************************
13 class MyDerivedClassI(Test
.TestIntf
):
17 def shutdown(self
, current
=None):
18 current
.adapter
.getCommunicator().shutdown()
20 def getEndpointInfoAsContext(self
, current
):
22 info
= current
.con
.getEndpoint().getInfo()
23 ctx
["timeout"] = str(info
.timeout
)
25 ctx
["compress"] = "true"
27 ctx
["compress"] ="false"
29 ctx
["datagram"] = "true"
31 ctx
["datagram"] ="false"
33 ctx
["secure"] = "true"
35 ctx
["secure"] ="false"
36 ctx
["type"] = str(info
.type())
38 ctx
["host"] = info
.host
39 ctx
["port"] = str(info
.port
)
41 if isinstance(info
, Ice
.UDPEndpointInfo
):
42 ctx
["protocolMajor"] = str(info
.protocolMajor
)
43 ctx
["protocolMinor"] = str(info
.protocolMinor
)
44 ctx
["encodingMajor"] = str(info
.encodingMajor
)
45 ctx
["encodingMinor"] = str(info
.encodingMinor
)
46 ctx
["mcastInterface"] = info
.mcastInterface
47 ctx
["mcastTtl"] = str(info
.mcastTtl
)
51 def getConnectionInfoAsContext(self
, current
):
53 info
= current
.con
.getInfo()
54 ctx
["adapterName"] = info
.adapterName
56 ctx
["incoming"] = "true"
58 ctx
["incoming"] ="false"
60 ctx
["localAddress"] = info
.localAddress
61 ctx
["localPort"] = str(info
.localPort
)
62 ctx
["remoteAddress"] = info
.remoteAddress
63 ctx
["remotePort"] = str(info
.remotePort
)