Kostas Harvatis
asked on
Telnet Socket output
I have a Socket() on port 23. I get the DataOutputStream and am ready to write. I want to send messages just like typing them over a telnet terminal or console.
I have tried the writeChars() method and the writeBytes() method, but no good. What should I do? Also, should the string to be sent be "message" or "message\n" or "message\r"?
Thanks
I have tried the writeChars() method and the writeBytes() method, but no good. What should I do? Also, should the string to be sent be "message" or "message\n" or "message\r"?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points :)
you usually have to perform option negotiation before you can send any data
see the following article
http://www.jscape.com/articles/telnet_using_java.html
see the following article
http://www.jscape.com/articles/telnet_using_java.html
ASKER