I've done a TelNet Server. BobO's done a TelNet Server. It's not that hard if you already understand TCPLISTEN.
TelNet Client, even easier.
I've attached the Server I did. It's a little dated - the STRING handling could be cleaned up a little.
As with all examples, this is for educational purposes only and the user assumes all responsibility for its use.
It accepts the following commands:
HELP - dumps these commands
READIO - dumps the first 32 X's and 32 Y's in hexadecimal
STATS - dumps IP Address, firmware rev, scan time
TIME - dumps current time in the PLC
DATE - dumps current date in the PLC
EXIT - terminate the session