in reply to telnet passthrough 2
Not try to figure out what is wrong with your code. Just want to memtion one point, you called the autoflush func on the socket, which is no longer needed, autoflush is now the default behavior. Well, obviously it does not cause problem, if you call it explicitly.