[Live-devel] setRTSPResponse accessibility issue

Scott Taylor scott.taylor at abaslabs.com
Mon May 20 21:29:40 PDT 2013


>> What's the correct way for my derived class to write a response? 
>> Currently the only solution I can see is to also derive from 
>> RTSPClientConnection and add a new function that forwards to 
>> setRTSPResponse (it's not virtual, so I can't just override it). 
>> However it seems like setRTSPResponse() should simply be public.
>
> Making the (4) "setRTSPResponse()" functions public wouldn't be ideal 
> (because we don't want *anyone* to be able to call these functions), 
> but because it solves your problem, it's probably a reasonable hack to 
> make in the code.  (It'll be included in the next release of the 
> software.)
>

Thanks Ross! I just realised it might be neater to provide forwarding 
functions in RTSPClientSession, eg:

protected:
     void setRTSPResponse(RTSPServer::RTSPClientConnection* 
ourClientConnection, char const* responseStr) { 
ourClientConnection->setRTSPResponse(responseStr); }
     // Repeat for the other three variants

That way, RTSPClientSession-derived classes can utilise the friend 
access to RTSPClientConnection. Still not ideal, but better than making 
them public?

Regards,
Scott


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130521/e1f5f55a/attachment.html>


More information about the live-devel mailing list