I would like to send some text to a port on my machine using
telnet in the Mac OS X Terminal.
telnet localhost 8080
Then I type some text. Is that text send automatically or do I have to do something to send the text?
Here's a simple Python server:
Save it as server.py, and run it
Then try to connect using the terminal
Then just type anything and press return
The server print the data in the console and send it back to you.
That way, you'll know what you have to do to send data via telnet.
The answer depends on what the remote end supports:
What the remote end does with the received input, depends on the remote end. Most server processes (HTTP, SMTP, POP, IMAP) tend to wait for end-of-line (EOL, newline) char before processing input. Some others may wait for end-of-file (EOF, ^D) before starting to process the input.
For more information about
welcome to mac world, where nothing works... I already check the source code of the telnet for mac, and there is no function to send a text...