[Live-devel] Exit testOnDemandRTSPServer after TEARDOWN message
Ross Finlayson
finlayson at live555.com
Tue Aug 1 11:47:41 PDT 2023
> On Aug 1, 2023, at 10:13 AM, Tim Storm via live-devel <live-devel at us.live555.com> wrote:
>
> I would like to modify the testOnDemandRTSPServer example application (or something very similar) to basically do a "proper" shutdown of the whole RTSPServer and process (i.e. doing proper cleanup within the program itself) after receiving a single TEARDOWN command.
I’m not sure why you would want to do this. Why not keep the server around, in case the same client (or a different client) wants to connect to the server again in the future. (The server consumes no CPU while it is sitting around, waiting for connections.) But anyway…
> Is there an quick/elegant way to implement something like that?
The simplest way to do this is to subclass the “RTSPServer” class, and reimplement the virtual function “handleCmd_TEARDOWN()” to just call
exit();
(The operating system will then automatically clean up all of the sockets (and memory) that the server is using.)
> I am very unfamiliar with Live555 and C++ in general
A familiarity with C++ is a prerequisite for using the LIVE555 code.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list