capture keyboard input with the read thread (local input)
capture and print an InputStream with the readInput thread (remote output from the game server)
Additionally, the input thread will also capture "alias" type commands, ie any keyboard entry starting with a special character is an "alias" for the client, a message to the client. This is in the read thread.
Also, the readInput thread will send each line off for processing for "triggers" with regex.
The above is just a very basic MUD client.
However, the input/output seems amazingly messy and difficult to follow. There are some definite kludges in capturing the "aliases", special commands, in the read thread, so that I can clean up a bit. In general, it's just quite difficult to follow. What are some sort of things I can do to make this easier to read, and maybe a better design?
TelnetConnection is the controller and InputOutput is, of course, the i/o. These two classes seem very clumsy, and I would like to break them up into smaller pieces, smaller classes, which just do one thing and do that one thing in an easy to see way. But breaking i/o in "input" and "output" seems a bit silly. Surely there's an organziational problem?