Sockets?

Why do you need to telnet the client and server?
Doesn't connect() do the job of connecting the computers?
What does telnet do and how do I make my client/server work without having to telnet it through terminal.
closed account (S6k9GNh0)
You are completely confused it seems. If you wouldn't mind, give your full idea on what you think sockets are and how to use them.
Sockets are basically like faucets- they allow entry of information and provide an output of information. They allow streams of data to be transferred from one location to another. Am I missing anything?
Thanks
closed account (S6k9GNh0)
Then where does telnet come into play in the idea of sockets?
Im not sure. I just read on the tutorial after creating the client and server, you need to telnet the computers together to allow flow of information. Was this incorrect?
Thanks
Yeah, that's incorrect. telnet doesn't have anything to do with this. It's just a tool that allows you to connect to a server (so you could use it for testing).
so i just need to run the server and client and the connection is automatically made?
The connection is made when there's a server accept()ing connections and a client connect()s to said server.
A telnet application is basically like a "dumb client" that passes everything you type to a server and prints everything the server replies with back to you.

If you write a server, you could use a telnet client to test your server works before writing a client of your own.

However the kind of testing that you can do with telnet is very limited and it is not likely to be much use beyond simply checking that your server is accepting requests.

You should ideally write your own test client that will ensure that the server is giving the correct responses to specific requests.
oh okay thanks that summed it up perfectly
Topic archived. No new replies allowed.