White Papers
J2SE for the Enterprise Developer, Part 4: SocketChannel and ServerSocketChannel
Overview This paper shows the SocketChannel and ServerSocketChannel classes and demonstrates how they enable servers to scale to thousands of clients using the new Selector class and nonblocking I/O. For network communication, J2SE 1.4 provides two new classes: SocketChannel and ServerSocketChannel. Going beyond the original java.net package and its Socket and ServerSocket classes, these new classes in java.nio.channels have several new features. They allow input and output sides of a socket to be independently shut down without closing the channel; they support asynchronous shutdown; and, most important, they can be used with a Selector for nonblocking I/O.
| Publisher | Oracle | File Format | HTML |
|---|---|---|---|
| Date Published | October 2006 | ||
| Format | White Papers | ||
| Topics |
|
||
