Can't really explain the situation in the best words but here is what I am dealing with.
I have a loop that cycles through the following code:
All connections that wont block the socket (that are ready to be read from) are added to a list. Then I have a foreach loop that cycles through the sockets to read from each one and process it. Say I have a class Connection that has data in it related to that specific socket. The class is initiated with the socket. How do I pull up the right class with the socket so I can pull information from it?Code:public IList<Socket> Select(ICollection<Socket> listeners) { var tcpListeners = new List<Socket>(from listener in listeners where listener.Poll(-1, SelectMode.SelectRead) select listener); return tcpListeners; }




Reply With Quote