puzzlecracker wrote:
> Client sends users name, server responds with SecretKey, then users
> send the encrypted password. Server responds with ConnectionObject to
> indicate the status. All the communication between client and server is
> encrypted thereafter.
The server responds by sending a secret key in the clear?
I suggest using existing procedures/protocols/standards/code. See
javax.net.ssl, for instance.
> it is pretty simple program, and I am thinking of using NIO .. What is
> the good architecture for such problem?
I guess start by googling "reactor pattern".
Admittedly, I don't have a copy of this volume, or have even read it,
but "Pattern-oriented Software Architecture Vol 2: Patterns for
Concurrent and Networked Objects" seems to fit:
http://www.amazon.co.uk/gp/product/0471606952/
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/