On 4/11/06, Cameron Taggart <[EMAIL PROTECTED]> wrote:
> I am trying to implement a client/server TCP protocol with mina.  In
> order to find out more about the TCP protocol, I have been trying to
> create a proxy.  An example of how to create a proxy would be great.

What kind of proxy are you trying to create?  In other words, what
protocol will you be proxying?

> I am a bit confused on yow to use IoConnector's.  There are lots of
> examples on how to bind to a port with an IoAcceptor and it would be
> nice if there were more IoConnector examples.

An IoConnector is quite similar to an IoAcceptor in terms of usage. 
It also needs a handler that will contain the logic for handling the
events.

> After receiving a
> message is received by the IoHandler for the IoAcceptor, what should I
> do to forward the message?

Where do you want to forward the message?

>  Can a ConnectFuture be reused?

A ConnectFuture contains the result of a connection operation.  Since
the connection would be unique, the ConnectFuture object would also be
unique.  Can you explain what you mean in terms of reusability?

>  What references should my IoAcceptor contain?

It depends on how you are implementing your business logic, actually.

> A proxy example that logged all communication would be ideal.

Every proxy implements a particular protocol. ie - HTTP, SOCKS 4,
SOCKS 5, etc.  What exactly are you looking at?

Regards,
Vinod.

Reply via email to