I wrote one of these in Java a year ago...mainly because of Java's good (IMHO) thread support. You really will need threads to make this work.
Threads for
- Incoming
- Outgoing
- Who's Online (possibly)
- Any other things you want to persistently monitor.. ie ping ponging the server occasionally to exit gracefully if you have a disconnect
Your server may need threads for
- each connection
- and a listener thread for initiating new connections and logging them
Keep in mind these are just my ideas and a basic structure to get you going on... if you don't have thread experience you're really going to want to read up on them before continuing on this project.
Hope my comments were helpful,