I don't know if I need it but when I saw the write() call is not getting the message sent across from the client to the server (response, sent by the client, for the request sent by server) I thought of this as a reason.
I tried using the this other write(Object message, SocketAddress add) method, by passing the socket address available through the session object but (like you said) it is not implemented. Is buffer.flip() an alternative to using this other write() method? ________________________________ From: Emmanuel Lécharny <[email protected]> To: [email protected] Sent: Fri, June 4, 2010 9:07:37 AM Subject: Re: How to write from Mina-Acceptor based server to a client session? On 6/4/10 5:39 PM, vikram nagpurkar wrote: > I found the other write() method available on IoSession. Please see the Java > doc link for that method. In the Java doc the duplicated port is mentioned. > > http://mina.apache.org/report/trunk/apidocs/org/apache/mina/core/session/IoSession.html#write%28java.lang.Object,%20java.net.SocketAddress%29 > Right. But is this something you are currently needing ? This is a very specific feature, not very uesed AFAIKI was doing the flip on the buffer. >> I debugged the code, but I could not see the calls to messageSent () >> method(s) at all. >> > The messageSent will be called at the very end when you do a session.write(). > If the message has not been emitted, you will not get a messageSent() event > either. > >> I was calling the session.write(Object message) method to respond back to >> the server from the client. >> Could it be that the client when responds to the server the response is sent >> to the duplicated port (not the actual port where server is listening) ? >> and that is causing this issue. >> >> > I don't know what is this duplicated port you are talking about. > > Hve you added the LoggingFilter to see what's going on ? You can put it in > different places in the chain, so you'll be able to know which filters are > called. > > > -- Regards, > Cordialement, > Emmanuel Lécharny > www.nextury.com > -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
