Basically your question is, if the operating system reuses socket handles? Yes, I would guess that with a long running server application there is no other way for the operating system. On Windows this definitely happens, see Winsock Programmer's FAQ[^]. In my networking applications I separate session/user handling from low-level networking, which means every user gets a unique ID assigned. There are many ways to create an ID, for example use the current UTC time paired with a random value. Alternatively, if you just need an unique internal reference, you could use this pointer of your C++ object. Not sure if this answered your question? M
Chat in Europe :java: Now with 24% more Twitter