Telnet Source

I'm looking for some telnet source code for both the client and the
server (i don't need them in the same unit, so if you have either it
would be fine).  I want to write a telnet client for telnetting to BBS's
(e.g. has ansi, scroll back, etc.) and I want to add telnet capability
to my BBS software.  

Please email me if you have anything that might help... thanks.

- Kyle Oppenheim, Illusion Development