I am developing a multi-threaded socket listener (daemon) .
I succesefully implemented multi threading using pthread library.
When the device connects to the daemon it send’s an identification number my question is:
How to store that identification number for every thread so when i receive some data from that device to know it’s ID.
In delphi is something called threadvar ( a variable that is allocated for every thread ).If that is not possible is there a library I can use to store lists? I am not planing to reinvent the weel ( eg make my own linked list )
I use GNUCC on Linux Mint
It would be easier to answer if we had you code but :
which is run in a thread (This thread local variable would be a pointer to your list of strings).
void *pointer (It is unclear if you need to do that though)