You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Akbar Munir Chaudhary <ak...@acm.org> on 2006/11/20 13:22:08 UTC
IoHandler notifications not being called by Mina v1.0 for localhost
I have recently switched to Mina v1 from v0.8. Though it must be a trivial mistake on my side, but i am not able to receive any message that is sent from client to server or from server to client. I did write the most basic client and server, without the protocol layer, using on ly the IoHandler. The "sessionCreated" is called on both sides. The notification "sessionOpened", "messageReceived" and "messageSent" are never called. I then tried using my client with a third party server. The message from my client to the server reached successfully but the server's message to my client was never received (the fact that "messageReceived" was never called).
As a 2nd step, I compiled the reverser application that comes with MINA and used it with 3rd party client. The reverser server did not receive any message from the client.
I am using Java 5 (Update 9) on Windows XP (SP2). Was not able to use Ethereal to sniff traffic, as I was testing only on localhost, for which Ethereal does not work on Windows. Any help or pointers as to my mistake will be greatly appreciated.
Thanks,
Akbar.
Re: IoHandler notifications not being called by Mina v1.0 for localhost
Posted by Mark Webb <el...@gmail.com>.
If you want to post the code, I can test it on a linux machine.
On 11/20/06, Akbar Munir Chaudhary <ak...@acm.org> wrote:
>
> I have recently switched to Mina v1 from v0.8. Though it must be a trivial
> mistake on my side, but i am not able to receive any message that is sent
> from client to server or from server to client. I did write the most basic
> client and server, without the protocol layer, using on ly the IoHandler.
> The "sessionCreated" is called on both sides. The notification
> "sessionOpened", "messageReceived" and "messageSent" are never called. I
> then tried using my client with a third party server. The message from my
> client to the server reached successfully but the server's message to my
> client was never received (the fact that "messageReceived" was never
> called).
>
> As a 2nd step, I compiled the reverser application that comes with MINA
> and used it with 3rd party client. The reverser server did not receive any
> message from the client.
>
> I am using Java 5 (Update 9) on Windows XP (SP2). Was not able to use
> Ethereal to sniff traffic, as I was testing only on localhost, for which
> Ethereal does not work on Windows. Any help or pointers as to my mistake
> will be greatly appreciated.
>
> Thanks,
> Akbar.
>
>
>
Re: IoHandler notifications not being called by Mina v1.0 for localhost
Posted by Niklas Therning <ni...@trillian.se>.
Pleae post the code of your client if possible.
/Niklas
Akbar Munir Chaudhary wrote:
> I have recently switched to Mina v1 from v0.8. Though it must be a trivial mistake on my side, but i am not able to receive any message that is sent from client to server or from server to client. I did write the most basic client and server, without the protocol layer, using on ly the IoHandler. The "sessionCreated" is called on both sides. The notification "sessionOpened", "messageReceived" and "messageSent" are never called. I then tried using my client with a third party server. The message from my client to the server reached successfully but the server's message to my client was never received (the fact that "messageReceived" was never called).
>
> As a 2nd step, I compiled the reverser application that comes with MINA and used it with 3rd party client. The reverser server did not receive any message from the client.
>
> I am using Java 5 (Update 9) on Windows XP (SP2). Was not able to use Ethereal to sniff traffic, as I was testing only on localhost, for which Ethereal does not work on Windows. Any help or pointers as to my mistake will be greatly appreciated.
>
> Thanks,
> Akbar.
>
>
>
>
--
Niklas Therning
www.spamdrain.net
Re: IoHandler notifications not being called by Mina v1.0 for localhost
Posted by hpq852 <hp...@gmail.com>.
With Mina1.0 you must use your own protocol , because the message you send from client to server is just a Object type, then Mina don't know how convert the message to ByteBuffer type. then it will not be sent. If your message is just String charachers, you can try TextLineCodec deployed with Mina. Hope it can help you.
发件人: Akbar Munir Chaudhary
发送时间: 2006-11-20 20:22:34
收件人: mina-dev@directory.apache.org
抄送:
主题: IoHandler notifications not being called by Mina v1.0 for localhost
I have recently switched to Mina v1 from v0.8. Though it must be a trivial mistake on my side, but i am not able to receive any message that is sent from client to server or from server to client. I did write the most basic client and server, without the protocol layer, using on ly the IoHandler. The "sessionCreated" is called on both sides. The notification "sessionOpened", "messageReceived" and "messageSent" are never called. I then tried using my client with a third party server. The message from my client to the server reached successfully but the server's message to my client was never received (the fact that "messageReceived" was never called).
As a 2nd step, I compiled the reverser application that comes with MINA and used it with 3rd party client. The reverser server did not receive any message from the client.
I am using Java 5 (Update 9) on Windows XP (SP2). Was not able to use Ethereal to sniff traffic, as I was testing only on localhost, for which Ethereal does not work on Windows. Any help or pointers as to my mistake will be greatly appreciated.
Thanks,
Akbar.