Socket identification key
Alex Rønne Petersen
alex at lycus.org
Thu May 31 07:46:40 PDT 2012
On 31-05-2012 16:44, "Jarl André" <jarl.andre at gmail.com>" wrote:
> Hi
>
> I have searched high and low to figure this one out. There does not
> seems to be a an accessible way of getting a unique key for a socket. I
> have learned that port numbers count a great deal but really shouldn't
> there be some internal numbering or representation of each socket that
> the developer can use in maps etc? Lets say I want to store statistics
> for each individual client, but I don't want the client to "log in" or
> something similiar. I want to automatically remember the handshake done
> by the underlying TCP connection.
>
> Is it possible to retrieve a unique key for a given socket? If this has
> been discussed before it is very well hidden in the depths of asgar, so
> please then enlighten me.
>
> Cheers.
Your Socket object *is* the key. It's a reference, it has a memory
address as value.
--
Alex Rønne Petersen
alex at lycus.org
http://lycus.org
More information about the Digitalmars-d-learn
mailing list