games.strategy.net.nio
Class NIOReader
java.lang.Object
games.strategy.net.nio.NIOReader
public class NIOReader
- extends java.lang.Object
A thread that reads socket data using NIO from a collection of sockets.
Data is read in packets, and placed in the output queye.
Packets are placed in the output queue in order they are read from the socket.
- Author:
- sgb
|
Method Summary |
void |
add(java.nio.channels.SocketChannel channel)
|
void |
closed(java.nio.channels.SocketChannel channel)
|
void |
shutDown()
|
games.strategy.net.nio.SocketReadData |
take()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NIOReader
public NIOReader(IErrorReporter reporter,
java.lang.String threadSuffix)
shutDown
public void shutDown()
add
public void add(java.nio.channels.SocketChannel channel)
take
public games.strategy.net.nio.SocketReadData take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
closed
public void closed(java.nio.channels.SocketChannel channel)