[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nick collide prevention ideas
Piotr Kucharski wrote:
>
> On Wed, Jul 07, 1999 at 05:40:02PM +0200, Q wrote:
> > More something like serverID + userID, where userID is probably
> > something based on the fd.
>
> No, fds are reused.
You probably want to make sure that if someone with an uid splits, and
that uid comes back, it's the same person. This would make it easier for
users.
What are you going to do then? keep a counter, and store the last one
used at certain times (like every 1000). And then next time start with
an high enough number. What in case the file is lost?
Or are you going to use a random number? This is the worst you can do.
After 1K clients you already have 0.3% of a collision, after 10K 26%,
20K 70% .... (this is with 44^5 cID's)
Something based on time and fd? Don't like this one either.
Any other suggestion?
Q