Question: what is the difference between socket and http connection?
Answer: With sockets you go on the level lower and actually control the connection and send/receive raw bytes. HTTP connection is a protocol that runs on a socket. HTTP connection is a higher-level abstraction of a network connection.