Shut down the Icepatch2 Server programmatically

in Help Center
Hello. I use Ice-3.1.1 now and IcePatch2 which is included in this distribution. I read in the manual that I can shut down the IcePatch2-Server programmatically if I passed the IcePatch2.Admin.Endpoints endpoint at its start. I read on the page 1465 of the manual:
If this property is not set, the only way to shut down the server is to kill it
somehow, such as by interrupting the server from the command line. If this
property is set, the server offers an additional interface with a shutdown operation,
allowing clients to remotely stop the server. Typically, you would set
this property to a port that is not accessible to potentially hostile clients.
But how can I access this interface and call the shut down function? Is there a simple way? Or do I have to look into your code in order to find out the name of the admin-servant, its identity and so on to create an appropriate proxy in the client and call the shut down?
Greetings
Ewgenij
If this property is not set, the only way to shut down the server is to kill it
somehow, such as by interrupting the server from the command line. If this
property is set, the server offers an additional interface with a shutdown operation,
allowing clients to remotely stop the server. Typically, you would set
this property to a port that is not accessible to potentially hostile clients.
But how can I access this interface and call the shut down function? Is there a simple way? Or do I have to look into your code in order to find out the name of the admin-servant, its identity and so on to create an appropriate proxy in the client and call the shut down?
Greetings
Ewgenij
0
Comments
For example, if you have configured IcePatch2 as follows:
IcePatch2.Admin.Endpoints=tcp -p 9999 -h 192.168.1.2
IcePatch2.InstanceName=MyIcePatch
then you can shutdown an instance of the IcePatch2 server as follows:
Greetings
Ewgenij
error: 'checkedCast' is not a member of 'IcePatch2::Admin'
so I need to include somethin else.
Greetings
Ewgenij
I think that the only piece of missing information is the identity of the IcePatch2 service admin object.