D
David Glover
Hi,
I am a newbie to multi-threading and especially in relation to the
..NET framework. My situation is as follows:
I have a whole number of threads (which are managing communicaion via
a TCP Socket) to a whole bunch of clients (one thread per client).
The situation could arrise where one client needs requests something
from another client. So I would guess that the thread of the
requesting client has to make a call to the thread managing the client
with the requested data. I also assume that the call needs to send the
data being requested - and then the thread will forward this data to
the client, and process the result (perhaps then forwarding the data
to the orriginal requesting thread, or writing the data to the disk).
I have kept a handle to the threads in a hash table in the *main*
thread (using IP address as the key), and the threads all have access
to this hashtable as they are passed a refernce to the parent thread
at their creation (along with the Socket!!)
How would I get the threads sending messages to each other?? Is this
even possible??
Many thanks for any help you can provide on this.
Regards,
David
I am a newbie to multi-threading and especially in relation to the
..NET framework. My situation is as follows:
I have a whole number of threads (which are managing communicaion via
a TCP Socket) to a whole bunch of clients (one thread per client).
The situation could arrise where one client needs requests something
from another client. So I would guess that the thread of the
requesting client has to make a call to the thread managing the client
with the requested data. I also assume that the call needs to send the
data being requested - and then the thread will forward this data to
the client, and process the result (perhaps then forwarding the data
to the orriginal requesting thread, or writing the data to the disk).
I have kept a handle to the threads in a hash table in the *main*
thread (using IP address as the key), and the threads all have access
to this hashtable as they are passed a refernce to the parent thread
at their creation (along with the Socket!!)
How would I get the threads sending messages to each other?? Is this
even possible??
Many thanks for any help you can provide on this.
Regards,
David