Thread: A Java Problem
View Single Post
Old 10-17-2004, 02:06 PM   #6
Kylotan
Member
 
Join Date: Jun 2003
Location: Nottingham, UK
Home MUD: Abattoir (Smaug)
Home MUD: ex-Jellybean (Smaug)
Home MUD: ex-Dark Chambers (Merc)
Posts: 174
Kylotan is on a distinguished road
Send a message via ICQ to Kylotan Send a message via AIM to Kylotan Send a message via MSN to Kylotan Send a message via Yahoo to Kylotan
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.
Kylotan is offline   Reply With Quote