Detect client disconnect from network

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Detect client disconnect from network

Tran Tu
Hi there,

Is there any way for the RTSP server detect the last_access activity from client?
My purpose is that when client gone out from network, rtsp server itself can detect this to close everything gracefully.
Reply | Threaded
Open this post in threaded view
|

Re: Detect client disconnect from network

Chuck Crisler-3

If you close everything gracefully, how can the next client connect?


On Nov 1, 2016 6:37 AM, "Tran Tu" <[hidden email]> wrote:
Hi there,

Is there any way for the RTSP server detect the last_access activity from
client?
My purpose is that when client gone out from network, rtsp server itself can
detect this to close everything gracefully.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Detect-client-disconnect-from-network-tp4680362.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Detect client disconnect from network

Prabhakar Lad
In reply to this post by Tran Tu
Hello,

On Tue, Nov 1, 2016 at 10:19 AM, Tran Tu <[hidden email]> wrote:
> Hi there,
>
> Is there any way for the RTSP server detect the last_access activity from
> client?
> My purpose is that when client gone out from network, rtsp server itself can
> detect this to close everything gracefully.
>
That is already handled by the rtsp-server, try reducing the session
timeout default is 60.
You might also want to look at [1].

[1] https://bugzilla.gnome.org/show_bug.cgi?id=767021

Cheers,
--Prabhakar Lad

>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Detect-client-disconnect-from-network-tp4680362.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Detect client disconnect from network

Hyunjun Ko
You can also refer to source code rtsp-client.c to learn about this.
See watch_funcs and "closed" callback.
Reply | Threaded
Open this post in threaded view
|

Re: Detect client disconnect from network

Tran Tu
Hi all,

The issue I pointed here is quite similar with Prabhakar Lad had noticed. But the scenario here is like this:
I have an application that can be start/stop streaming as an RTSP server. My server and client has the same LAN network (192.168.2.xx)

1. My app start streaming via RTSP
2. VLC client access the stream
3. Then from the client, I made it join into another network ( its IP now is 192.168.0.yy)

The server do nothing happens from then on, my intention is that how can rtsp server can periodically detect the presence of client to clear all things gracefully when client lost the connection.

For the "closed" callback mentioned in rtsp-client.c, I just wonder whether how can it emit TEARDOWN when it already lost the connection to server.