You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Julien Vermillard <jv...@archean.fr> on 2005/05/09 12:55:51 UTC
[MINA] IOConnector.connect & Serial connection
I'm trying to make a first implementation of a SerialConnector
A serial connector connect to a given serial port (COM2 on
windows, /dev/ttsS0 on Unix). In this case the second argument to the
next method (localAddress) doesn't make much sense for me. Should I just
ignore it, or throw some exception if it's not null ?
/**
* Connects to the specified <code>address</code> with timeout. If
* communication starts successfully, events are fired to the
specified
* <code>handler</code>. This method blocks.
*
* @param localAddress the local address the channel is bound to
* @throws IOException if failed to connect
*/
IoSession connect( SocketAddress address, SocketAddress
localAddress,
int timeout, IoHandler handler ) throws
IOException;
Julien
Re: [MINA] IOConnector.connect & Serial connection
Posted by Trustin Lee <tr...@gmail.com>.
Hi,
2005/5/9, Julien Vermillard <jv...@archean.fr>:
> I'm trying to make a first implementation of a SerialConnector
>
> A serial connector connect to a given serial port (COM2 on windows,
> /dev/ttsS0 on Unix). In this case the second argument to the next method
> (localAddress) doesn't make much sense for me. Should I just ignore it, or
> throw some exception if it's not null ?
You can simply ignore it. But Session.getRemoteAddress() may not
return null. You'll have to create a type like
AnonymousSerialPortAddress(). Please refer to AnonymousVmPipeAddress.
We'll provide AnonymousSocketAddress() in 0.9
Thanks,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/