0 votes
by (250 points)

Hi Team, how to get the Running server to stop it? There are no ids etc that i can use. Appreciate your support.

        if (server == null)

        // on stop, mark collection as completed and unregister MessageReceived event
        server.MessageReceived -= server_MessageReceived;
        server = null;
Applies to: Syslog

1 Answer

0 votes
by (70.4k points)

I am not sure what you are asking for. You can stop the Syslog server as shown in your provided code.

You have to keep reference to an instance of the running SyslogServer. In your code, it is the server variable. Then call the Stop() method to stop the server.

You need no ids etc, just use the server instance.