On 7/12/07, Mike Heath <[EMAIL PROTECTED]> wrote:
On Thu, 2007-07-12 at 14:11 +0900, Trustin Lee wrote:
> On 7/12/07, Mike Heath <[EMAIL PROTECTED]> wrote:
> > I've been thinking about this specific issue for a while now for a
> > project I've got coming down the pipe-line.
> >
> > I'll try to add support for writeFile to IoSession in MINA trunk per
> > DIRMINA-218.  I should have time this weekend to work on it.
>
> Should we provide this operation to all transports?  I guess we can't
> because Serial port communication doesn't work in the same manner.  We
> could make the method available only in SocketSession.

We may not be able to provide FileChannel.transferTo support for Serial
port communication but it might be a nice convenience method to have
anyway.  It would be trivial to implement something that sent the
contents of a file directly to the Serial port.  (Am I assuming too
much?  I haven't even looked at the Serial port code.)

At least we need to think about possible new transports such as group
communication, other JNI-based implementation, and many more.  Of
course, providing an emulation will be very convenient, but such an
emulation can be implemented as a filter like we did for InputStream
(i.e. StreamWriteFilter), so I think file transfer method should exist
only in SocketSession.

Besides, there's not really any need for zero copy I/O with serial port
communications.  The fastest serial ports are orders of magnitude slower
than the slowest NICs.

Right! :D

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

Reply via email to