directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject Re: [MINA] and readiness selection
Date Tue, 19 Jul 2005 00:13:37 GMT
Hi Bharath,

2005/7/18, Bharath Sundararaman <>:
> I'm trying to talk to a PLC using MINA via Ethernet/IP protocol. 
> Basically, I need to have a Channel (eg. SocketChannel) which registers with 
> a Selector (called via SocketAcceptor). The Channel is tied to the PLC's IP 
> address and it performs the reads/writes from the PLC. 
> I tried to use SocketAcceptor and SocketConnector to achieve this but the 
> SocketConnector cannot use the 'Session' object which is returned by the 
> 'connect' method to write onto the session. In other words, the 
> SocketConnector (or the channel in my case) cannot initiate the read/write. 
> I am trying to just link the PLC to a channel which registers with a 
> selector via MINA.
You could write messages on a 'sessionOpened' event. If any data is read 
from SocketConnector, you'll get notified by a 'dataRead (or messageReceived 
if you're using Protocol layer)' event.

what we call human nature is actually human habit

View raw message