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.

1 Answer 1


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.

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.