On Mon, Jan 3, 2011 at 3:27 PM, Emmanuel Lecharny <[email protected]> wrote: > On 1/3/11 8:35 AM, Muhammad Ichsan wrote: > > So if you want to write some message in a session, do it in your application > implementing the IoHandler interface. The good candidate will be to do that > in the messageReceived( IoSession session, Object message) event, where the > session is present.
But, this messageReceived( IoSession session, Object message) won't be called on acceptor's IoHandler unless it's clients send a message first. In my case, clients doesn't send first message. They just respond to what server sends. I thought I could use session inside sessionOpened(IoSession session) in acceptor once a client has connected to server. The real case could be a chat server and client system. But, instead of socket connector send the first message to server, it is server that send the first hello message to a client. The client, never sends any message unless the server sends hello. -- ~The best men are men who benefit to others http://michsan.web.id 一緒に勉強しましょう! Yang berkualitas memang beda rasanya! http://rizqi-cookies.com
