| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Wed Feb 27, 2008 7:37 pm Post subject: How to Kill a client based on clientid |
|
|
Hi,
I'm new to Icecast. I set up a config using authentication (http) and need to be sure that a user only listen to the stream at one place. Off course, I do not want that if a client is already logged on one PC, he can not log on another but instread, I want to kill the first stream and allow him to listen on the second pc.
That's why I need to be able to stop a stream based on a Client ID when I receive a listener_add event with a username that I did not received a listener_remove for.
Does someone have any idea on how to achieve that ?
Many thanks,
Valery |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 27, 2008 10:19 pm Post subject: |
|
|
you could use the drop_existing_listener option in my branch work which will apply to url or htpasswd auth but only applies to matching usernames not IPs. If you use url auth to validate only anything else then it icecast won't match and you'll have to rely on the auth server to handle the duplication.
For the latter case or using trunk, you'll have to keep a record of the user connecting and the client id which is passed in the POST. If you see the a new listener matches some existing listener then you can issue a killclient request with the stored client id.
karl. |
|
| Back to top |
|
 |
|