Telnet Example?

I need to write an interface to a Telnet connection.

Are there any examples out there?

Ed in Calif