Closing a channel

Prashant Hegde <[email protected]> Tue, 9 Nov 2004 16:00:53 +0530
Newsgroups gmane.network.beep.beepcore.java.general
Message-ID <[email protected]>
I am trying to implement RFC 3195 based reliable syslog mechansim.

In this communication, my listener is sending a close channel.

For example:
// once the listener figures out that he has received "NUL" message,
he tries to close the
//channel

public void receiveNUL(Message msg){
		Channel channel = msg.getChannel();
		try {
			channel.close();
		}catch(Exception e){
			e.printStackTrace();
		}
	
}

This results in the initiator getting the "close" message..and it
responds with its close message. However, the listener is not able to
process this message as he is blocked in "channel.close()"

Is this the right way to use Channel.close or am I missing something?

Prashant


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click