简体   繁体   中英

How to create my own network protocol to communicate in java

I want to create my own network communication protocol using java to communicate between my android app and server(I don't want use http services ) . As i don't have much more knowledge about how actually protocol works i am confused. I have seen some tutorials where they have created some protocols using socket programming , is this only way to do so?? please help .

Even though you are into the idea, you will end up by having it on top of the HTTP protocol (this because of its firewall friendliness , specially when we are talking an android server solution). Still you will need to have the required HTTP headers . I would recommend take a look at REST and see if it is good enough for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM