is http only for browser based connections? For example to transform some data to server using browser we need a form that we specify the method and enctype and other things, but I want to know is there same condition for android apps or softwares . I mean to transform data to server trough these can we use http protocol or there is other protocols for these? and another question , to have continuous connection with server what protocol should be used? I mean like multiplayer games that send and receive data frequently .

1 Answers

0
Community On

HTTP could be used for almost any purpose other than Web. The only thing is that it is a request-response protocol : the client send the request to the server, which sends back the response, and the connection is closed.

It is used in many APIs, so you can access web services from any device/app.

If you need some persistent connection, I'd rather use sockets (or websockets if needed in browser), to connect directly over TCP or UDP protocol to the server. It allows you to maintain a connection with a two-way communication channel.

Hope I was clear in my explanations :-D

Best regards