Server and Client at the same time
gonzus
gonzalo.diethelm at diethelm.org
Thu Jun 11 10:56:28 EDT 2009
Hello everyone, this is my first post here. I am examining Netty (after a
brief look at MINA) and 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 Netty:
1. Have an acceptor and connector at the same time running on the same
program.
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 :-D 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.
--
View this message in context: http://n2.nabble.com/Server-and-Client-at-the-same-time-tp3062462p3062462.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list