Quoting peter royal <[EMAIL PROTECTED]>:

On Jun 29, 2006, at 11:02 AM, [EMAIL PROTECTED] wrote:
I face the current situation:

1) a device connects to my server and sends a first message to initiate a logical session
2) the server replies
3) the device now listens on the port
4) the server sends some requests (and waits for replies)
5) when it has finished, the server sends a final message to close logical session
6) the device replies and closes connection

I thought that I could use a filter to handle message exchanges of 1), 2), 5) and 6). A separate handler would deal with exhanges in 4).

The filter would completely hide logical session handling. This  means that

a) the handler would receive a sessionOpened() when filter has completed point 2).
b) a call to close() by the handler would initiate 5)

I have implemented it, but when I write a message in my filter, the messageSent is never called.

Where am I wrong?

I now have problem when filtering 'close'.

In filterClose, I send a message and directly return (no call to nextFilter.filterClose)

The message is never sent. I added a Callback to WriteFuture, and isWritten returns false.

What am I doing wrong?

How could intercept close?

J-F

Reply via email to