2013年9月11日星期三

APP for Android client and server side what is generally agreement ?

RT, such as a photo- sharing application , is to use HTTP or use SOCKET? Can speak in detail about the best . Thank you.
------ Solution ---------------------------------------- ----
http, socket not a protocol , network programming interfaces , use the http socket can be achieved , a lot of look book.

------ Solution ------------------------------------ --------
whatever you want , socket with http to see what you think , if we consider real-time, such as chat software , send messages to each other immediately receive , then use the socket, this will power, http it is not real-time , the need to maintain the heartbeat connection , current consumption , but now wifi , the traffic is not so precious
------ For reference only ------------- --------------------------

novice learning , for applications such as photo sharing APP, whether on the client and server fetched a little bit of technical guidance ?
------ For reference only -------------------------------------- -
available for download server-side interfaces , app http requests initiated , the need to download the picture to your phone display
------ For reference only --------------- ------------------------

weak weak to ask , that for the Android APP, http is well supported C / S mode ?
------ For reference only -------------------------------------- -
Android use http course no problem
------ For reference only ---------------------------- -----------
done before a small example , upload photos, view the server -side photos ! ! ! , Is to use the http
------ For reference only --------------------------------- ------
use http no problem
------ For reference only ------------------------- --------------

are you talking about ? http is an application layer protocol , maintaining hair heartbeat ah
------ For reference only --------------------------- ------------

are you talking about ? http is an application layer protocol , maintaining hair heartbeat ah  

done live chat software are aware that the client with the server , we must maintain a long connection , socket also need heartbeat , or the server can not determine whether the client is dropped, and http, there is a message to a friend you must use to pick up the heartbeat , the server can not real-time push , if you use XMPP, MQTT and other agreements that the other said , as to why the heartbeat , you still get to know more about it , such as NAT mechanism , not in this barking < br> ------ For reference only ---------------------------------------
I have to do mobile client development, checked the online information needs , and said real-time , then use sOCKET socket is TCP / IP communication , you can use C / S mode or B / S mode

没有评论:

发表评论