2

If arduino works as a client and tries to connect to web server (the server is mine), should I connect to it via TCP or HTTP connection? Data will be simple strings (20 chars at max) so TCP connection should probably be enough?

The connection has to work in both ways - web server sending data to arduino and arduino sending data back to server.

asked Dec 14, 2015 at 23:23

1 Answer 1

2

It's time you learned the OSI 7 layer model: PDNTSPA.

HTTP is a Presentation (protocol) that runs over a TCP Session. If you are interacting with a web server then you will be opening a TCP socket and sending HTTP requests.

There is no other way of talking to a web server. It only speaks HTTP, and you can only connect to it through TCP.

answered Dec 14, 2015 at 23:35
1
  • Oh god this is awkward, thank you. Somehow I thought HTTP/TCP are different things in my case. Commented Dec 14, 2015 at 23:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.