directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [MINA] Using MINA to write a proxy server like application
Date Fri, 02 Dec 2005 02:29:50 GMT
Hi Srikanth,

2005/12/2, Srikanth Veeramachaneni <sveerama@gmail.com>:
>
> - I consider my above solution to the greeting problem a very bad hack.
>    What is the best approach to handle such a need?


You can create a queue that buffers the data until the attachment is set.
You notify the handler when after you set the attachment, then the queue has
to be flushed.  WDYT?  This is actually the technique I'm using in
SSLFilter.

- Is my approach overall reasonable? i.e. opening a session to
>    the application server once the SSL handshake is completed and then
>    piping the read event to each other in the dataRead() methods of each
>    of these sessions and using the attachments to enable the data piping.


It's absolutely OK.  :)

- Are there better approaches or alternatives?


What you're doing is what most others are doing to implement a proxy server
in MINA.  It's good.

I am quite new to MINA and NIO in general. So, please feel free to point out
> if I am totally being inefficient here.


You're doing fine.  Please let us know any difficulties you suffered from
MINA.  We're completely open to user feed back! :)

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message