<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Close specified client by
IP</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1"
color="#0000FF">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?</font></blockquote>
<div><br>
Once again:</div>
<div>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.</div>
<div><br></div>
<div>As always, you should be able to do this just via subclassing -
without modifying any of the supplied "LIVE555" code.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>