Ah, how careless I'm. Thanks for the reminder, it was the server who disconnects the connection. I took almost a half day to research into Mina's source but found nothing. Thank you very much.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Emmanuel Lecharny Sent: Wednesday, April 21, 2010 6:50 PM To: [email protected] Subject: Re: How to make persistent connection from the client side > > Hi all, > > I’m new to Mina. Recently I’m writing a client program to communicate a > server using persistent connection. I thought I can reuse IoSesssion to > continuously sending message to the server, that’s when a message is sent, > the session is still kept open, and I can send another message with this > open seession. but I obversed that the session will be closed right after > the first message is sent. Here is the code I used to send message and > receive the response in synchronous manner: > The session is *not* closed if nobody closes it. Ie, it might be the server. In this case, that means you have to check on the server side to see if your message has been correctly processed, or if the server hasn't closed the session. -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
