Hello again. I would like to gather opinions on how to implement a proof
of concept for my requirements. 

I intend to have two copies of the same program running on the same
machine (this is not a requirement, it is just easier). The two programs
will be run like this: 

$ program 8001 8002 
$ program 8002 8001 

This means the first copy will bind on port 8001 and try to connect to
port 8002, and the second program will bind on port 8002 and try to
connect to port 8001. After successful connection, the program will send
a single string "Hello World"; after making sure it has sent one string
and received one string, the program will shut down gracefully. 

What I am trying to learn is how to do the following in MINA: 

1. Have an acceptor and connector at the same time running on the same
program (this is already pointed at in the Proxy example).
2. Handle failed connect attempts and a reconnection policy. 
3. Proper way of shutting down a server. 

Are there any examples that could help me implement this? Any
suggestions? 

Extra credit :-) if the program ends up being capable of running a
single copy like this and doing "the obvious": 

$ program 8003 8003 

Thanks in advance and best regards,

 

-- 

Gonzalo Diethelm

DCV - Chile

 

 


Reply via email to