Archived
This forum has been archived. Please start a new discussion on GitHub.
waitForShutdown method
sionscone
in Help Center
Hi
I'm using the Client / Server 'Hello World' example in C# given in your documentation, but there appears to be a problem.
On the server side, after the client message has been received the Ice Communicator doesn't shut down.
i.e. in this section of the code
adapter.activate();
ic.waitForShutdown();
Console.WriteLine("My message");
The writeline never appears, even after a message is received from the client. The Ice Communicator is never destroyed because the code never gets that far... I know there are other methods (.destroy(), .shutdown(), etc) that I can use to kill the server. But I want to wait for a message to be received first.
Is it possible to open the server and wait until a message is received, then close the server and continue? So I am able to do something, open a server, wait until a message is received and then continue my program.
thanks
I'm using the Client / Server 'Hello World' example in C# given in your documentation, but there appears to be a problem.
On the server side, after the client message has been received the Ice Communicator doesn't shut down.
i.e. in this section of the code
adapter.activate();
ic.waitForShutdown();
Console.WriteLine("My message");
The writeline never appears, even after a message is received from the client. The Ice Communicator is never destroyed because the code never gets that far... I know there are other methods (.destroy(), .shutdown(), etc) that I can use to kill the server. But I want to wait for a message to be received first.
Is it possible to open the server and wait until a message is received, then close the server and continue? So I am able to do something, open a server, wait until a message is received and then continue my program.
thanks
0
