What are C# classes for SelectionKey, SelectableChannel and Selector in Java? Are there any direct translations of those classes or what are the next best things?
Edit:
As Marc Gravell pointed out, it’s for a multiplexer for IO operations (network).
There aren’t any classes directly corresponding to the java.nio model in .NET. Asynchronous IO is typically performed using a
BeginRead/EndRead(etc) approach. There’s also the event-based asynchonous model used by classes likeWebClient. Additionally in .NET 4 with the Task Parallel Library you can use task-based asynchrony, which can also take advantage of theBegin/Endpattern.You can read more about asynchronous IO in .NET in MSDN.
Note that C# 5 will introduce asynchronous methods, which will make a lot of this easier.