libiec61850
libiec61850 copied to clipboard
How to use SetConnectionIndicationHandler
Hello! I'm currently working on a research project and absolutely love this project. I'm just wondering, how you can use the SetConnectionIndicationHandler() function. The ConnectionIndicationHandler needs the following Parameters: IedServer iedServer, ClientConnection clientConnection, bool connected, object parameter, but how do I get the clientConnection?
Thanks a lot!
The ConnectionIndicationHandler is a callback function you have to provide and when called your code will receive these parameters. Like in this example: https://github.com/mz-automation/libiec61850/blob/35ac4794301fb5d1f660d6ff0b4e50acd64632d9/examples/server_example_basic_io/server_example_basic_io.c#L74
Thank you very much for your answer @mzillgith, but I'm working in C#. I tried to setup the SetConnectionHandler Function like the other Event Handlers (of course with changed parameters) but nothing seems to be working.