I'm trying to understand multi-threading in TCP so I'm coding a basic telnet text "router".
using ReadLine()
each thread using a TCP listener will wait for input from the telnet client and then respond based on the text which is sent. I have this working with multiple threads and multiple telnet clients.
I want to conditionally send messages to all threads.
For example, if the text sent from any one thread is "Alert!" then I want every thread for connected clients to execute WriteLine("Alert!")
Does this make sense? My problem is that I don't know how to make one thread raise an event in another thread.