[Live-devel] Close specified client by IP

Ross Finlayson finlayson at live555.com
Wed Sep 15 12:31:23 PDT 2010


>Thanks Ross, I just want to close client connection by IP address 
>and not consider port number, because in our project not allowed 
>more than one connection from the same IP address. After reading 
>your reply, I'm sorry that I still don't know how to do this. I just 
>got the client IP address that would be closed, according to your 
>suggestion I must find the clientsession first, but how can I 
>find its clientsession by this IP address?

Once again:
I suggest that you subclass "RTSPServer" to add a hash table that 
maps "client IP address" to "RTSPClientSession".  Redefine the 
"createNewClientSession()" virtual function to add an entry into this 
hash table each time that you create a new "RTSPClientSession" 
object.  Also, whenever you delete a "RTSPClientSession" object (to 
close its connection), remove the corresponding hash table entry.

As always, you should be able to do this just via subclassing - 
without modifying any of the supplied "LIVE555" code.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100915/44133ea2/attachment.html>


More information about the live-devel mailing list