mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Duffy" <gdu...@gmail.com>
Subject Re: synchronous responses to client
Date Tue, 19 Sep 2006 12:40:12 GMT
There is definitely a queue, as the IoSession.write(...) method is
asynchronous. Quoth the javadoc,

http://directory.apache.org/subprojects/mina/apidocs/org/apache/mina/common/IoSession.html#write(java.lang.Object)

As you can see from that link, you may wait for the message to be
written by calling join on the WriteFuture returned by
IoSession.write(..). It will block until MINA writes the message out.

HTH.
-Greg

On 9/19/06, Mark <elihusmails@gmail.com> wrote:
> when I look at the FTP traffic, it appears as though the responses
> from my FTP Server do no match up with what the client is sending.
> When MINA sends data to a client using IoSession.write(), does that
> data get sent immediately, or is it queued in some fashion?
>
> Thank you.
>
>
> On 9/18/06, Vinod Panicker <vinod.p@gmail.com> wrote:
> > On 9/19/06, Mark <elihusmails@gmail.com> wrote:
> > > I am working on a FTP server using MINA, and it appears that the
> > > responses that the FTP server are sending back to the client are
> > > asynchronous.  Based on my understanding of the protocol, the
> > > responses need to be synchronous.  So the client sends a command, and
> > > the server sends a response.
> > > Is there a way to guarantee client-server data synchronization using
> > > MINA?  I have tried subclassing both the StreamIoHandler and
> > > IoHandlerAdapter classes and neither have worked.
> >
> > Pardon me, but I don't quite understand. If the server is yours
> > (developed by you), I assume that you are responsible for sending the
> > responses to the client.
> >
> > Regards,
> > Vinod.
> >
>

Mime
View raw message