How to handle disconnects?

Hi,
I am currently trying to understand how I can catch disconnections.
I see that once a stream is opened (udp), that probably some heartbeat is send to my camera.
I would like to do something if this heartbeat fails.
I thought that:

    g_signal_connect(arv_camera_get_device(camera), "control-lost", G_CALLBACK(control_lost_cb), nullptr);
    arv_stream_set_emit_signals (cameraStream, TRUE);

Would do the trick, but it seems that the event is not popped in a UDP stream. How are disconnect events normally caught by the client application?

Hi,

g_signal_connect(device, "control-lost",...) should be enough. arv_stream_set_emit_signals() only applies to the stream new-buffer signal.

It is supposed to work with every type of devices.

Emmanuel.

Hi,
thank you for the fast response, then I maybe misread, I’ll have a deeper look here.