games.strategy.net.nio
Class NIOReader

java.lang.Object
  extended by 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

Constructor Summary
NIOReader(IErrorReporter reporter, java.lang.String threadSuffix)
           
 
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
 

Constructor Detail

NIOReader

public NIOReader(IErrorReporter reporter,
                 java.lang.String threadSuffix)
Method Detail

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)