Solved

Telnet Socket output

Posted on 2001-08-02
4
244 Views
Last Modified: 2008-03-06
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
0
Comment
Question by:harvk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 6344054
It's not that simple, read the telnet tfc:

http://www.faqs.org/rfcs/rfc854.html
0
 
LVL 1

Author Comment

by:harvk
ID: 6344198
Thanks! The answer is always much easier to find than I think :)
0
 
LVL 92

Expert Comment

by:objects
ID: 6346605
Thanks for the points :)
0
 

Expert Comment

by:jscape
ID: 9752560
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
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question