hunt.net.Connection

Undocumented in source.

Members

Aliases

ConnectionEventHandler
deprecated alias ConnectionEventHandler = NetConnectionHandler
Undocumented in source.
ConnectionEventHandlerAdapter
alias ConnectionEventHandlerAdapter = NetConnectionHandlerAdapter
Undocumented in source.
NetConnectHandler
alias NetConnectHandler = NetEventHandler!Connection
Undocumented in source.
NetConnectionHandlerAdapter
alias NetConnectionHandlerAdapter = AbstractNetConnectionHandler
Undocumented in source.
NetErrorHandler
alias NetErrorHandler = NetEventHandler!(int, Throwable)
Undocumented in source.
NetExceptionHandler
alias NetExceptionHandler = NetEventHandler!(Connection, Throwable)
Undocumented in source.
NetMessageHandler
alias NetMessageHandler = DataHandleStatus delegate(Connection, Object)
Undocumented in source.
Session
deprecated alias Session = Connection
Undocumented in source.
TcpSession
deprecated alias TcpSession = Connection
Undocumented in source.

Classes

AbstractNetConnectionHandler
class AbstractNetConnectionHandler
NetConnectionHandler
class NetConnectionHandler

Handles all I/O events on a socket connection.

Enums

ConnectionState
enum ConnectionState
Undocumented in source.

Interfaces

Connection
interface Connection

<p> A handle which represents connection between two end-points regardless of transport types. </p> <p> {@link Connection} provides user-defined attributes. User-defined attributes are application-specific data which are associated with a connection. It often contains objects that represents the state of a higher-level protocol and becomes a way to exchange data between filters and handlers. </p> <h3>Adjusting Transport Type Specific Properties</h3> <p> You can simply downcast the connection to an appropriate subclass. </p> <h3>Thread Safety</h3> <p> {@link Connection} is thread-safe. But please note that performing more than one {@link #write(Object)} calls at the same time will cause the {@link IoFilter#filterWrite(IoFilter.NextFilter,Connection,WriteRequest)} to be executed simultaneously, and therefore you have to make sure the {@link IoFilter} implementations you're using are thread-safe, too. </p> <h3>Equality of Connections</h3> TODO : The getId() method is totally wrong. We can't base a method which is designed to create a unique ID on the hashCode method. {@link Object#equals(Object)} and {@link Object#hashCode()} shall not be overriden to the default behavior that is defined in {@link Object}.

Templates

NetEventHandler
template NetEventHandler(T...)
Undocumented in source.

Meta