|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgames.strategy.net.nio.NIOSocket
public class NIOSocket
The threads needed for a group of sockets using NIO. One thread reds socket data, one thread writes socket data and one thread deserializes (decodes) packets read by the read thread. serializing (encoding) objects to be written across the network is done by threads calling this object.
| Constructor Summary | |
|---|---|
NIOSocket(IObjectStreamFactory factory,
NIOSocketListener listener,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
add(java.nio.channels.SocketChannel channel,
QuarantineConversation conversation)
Add this channel. |
void |
close(java.nio.channels.SocketChannel channel)
Close the channel, and clean up any data associated with it |
void |
error(java.nio.channels.SocketChannel channel,
java.lang.Exception e)
An io error occured while reading or writing to the socket, and it should be removed from the network |
void |
send(java.nio.channels.SocketChannel to,
MessageHeader header)
|
void |
shutDown()
Stop our threads. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NIOSocket(IObjectStreamFactory factory,
NIOSocketListener listener,
java.lang.String name)
| Method Detail |
|---|
public void shutDown()
public void send(java.nio.channels.SocketChannel to,
MessageHeader header)
public void add(java.nio.channels.SocketChannel channel,
QuarantineConversation conversation)
public void error(java.nio.channels.SocketChannel channel,
java.lang.Exception e)
IErrorReporter
error in interface IErrorReporterpublic void close(java.nio.channels.SocketChannel channel)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||