Old 23rd April 2015, 15:11   #1
Junior Member
Join Date: Mar 2015
Posts: 39
UID how Unique is it?


I'm writing an analytics web app for Shoutcast stats, and I'm wondering, how unique is UID?

From what I understand it can get re-used, but I'm wondering can it be re-used for the same IP.

Reason for this is to determine what is, and isn't a new listening session from the same IP, so that the web app could update the amount of time said IP has listened for.

As results will be stored in MySQL, each time the app polls the shoutcast server, it would search the database to see is a record exists for the IP + UID combination. If so it would then update the time field to record the length of time that IP/User has listened for.

But if the user disconnects and then reconnects, the UID should, in theory, be different, so it would then create a new entry in the database, as this is a new listening session.

So is UID unique enough to do this, or would I need to take other factors into consideration?
mattauckland is offline   Reply With Quote
Old 23rd April 2015, 16:12   #2
Join Date: Sep 2003
Posts: 27,873
as of v2.4, it's unique for the duration the DNAS is running (prior to that there were cases where it could be duplicated during the duration the DNAS is running).

if the DNAS is restarted, then it will re-use the UIDs already seen as it all starts from 1 (which also better matches the 1.x DNAS, whereas 2.0-2.2.2 used a random value for the UID).
DrO is offline   Reply With Quote
Old 24th April 2015, 00:26   #3
Junior Member
Join Date: Mar 2015
Posts: 39
Brilliant, that answers my question. Thanks.
mattauckland is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

stats, uid

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump