On 5/28/07, James Apfel <[EMAIL PROTECTED]> wrote:
Hi,

this is maybe a stupid question but is there are method to check if a
connection is incoming or outgoing? I have an IoHandler and would like
to set certain attributes of IoSession based on the direction of the
connection in sessionCreated().

IoSession.getService() will return the IoService instance that created
the session.  If it's an incoming connection, the returned instance
will be IoAcceptor.  If outgoing, it will be IoConnector.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to