directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Raess <co...@gmx.ch>
Subject [mina] protocol implementation question
Date Fri, 17 Feb 2006 06:39:01 GMT
hi

I'm trying to implement the BEEP protocol (RFC3080) on top of Mina.  
Now, I have several questions relating to the implementation.

I've implemented a basic IoFilter that implements framing according  
to the BEEP protocol. The next filter is supposed to implement the  
transport specific mapping for TCP (RFC3081). This mapping defines a  
sliding window mechanism for BEEP channels. The TCP mapping filter  
needs to send a message back to the other side to acknowledge  
messages (i.e. slide the window). An IoFilter has access to the next  
filter. However, it does not have access to the previous filter (to  
send the message). I know, I could use the IoSession to send a  
message, but then it starts at the top of the filter chain  
(correct?), i.e. it passes all the filters in the chain, even the  
ones above the current filter (which is not really what I'd like to do).

To clarify what I'd like to do:
1. TCP mapping filter receives a message
2. it determines that it should send a SEQ frame (to acknowledge the  
message)
3. it sends a SEQ frame (passing it to the filter below, i.e. the  
framing filter)

The idea is basically to have a layered architecture (implemented  
with filters).

I'm wondering whether it is "a good idea" to send messages from  
within the filters. Has anybody done that? Is it possible to pass a  
message to the previous filter when receiving messages? Or should I  
handle these issues in the protocol handler, possibly using  
IoHandlerCommand or a layered protocol handler stack? Any other  
suggestion, ideas?

Simon


Mime
View raw message