You open a TCP connection to the given host and port. Then, you proceed to read data whenever it's available and write it whenever you need to. That much is trivial and there are hundreds of chat client/server pairs implemented in Java out there. When it comes to muds the slightly tricky parts include handling telnet codes and ANSI codes.
Java socket handling will be in any decent Java book, though I expect there are more than enough examples online anyway. Telnet handling is described in the relevant RFCs and ANSI codes are documented across the web too.
|