I am trying to understand SocketChannels, and NIO in general. I know how to work with regular sockets and how to make a simple thread-per-client server (using the regular blocking sockets).
So my questions:
- What is a SocketChannel?
- What is the extra I get when working with a SocketChannel instead of a Socket.
- What is the relationship between a channel and a buffer?
- What is a selector?
- The first sentance in the documentation is
A selectable channel for stream-oriented connecting sockets.
. What does that mean?
I have read the also this documentation, but somehow I am not getting it...