Telnet client "command" control

Hi
In our project I have to write one telnet client. according to RFC of telnet, in order to connect to telnet server,client has to send some "control command" to server.
Is there any sample for these commands?