How to write communication protocol in java? Give a small example.
To tell the truth, the simple understanding of communication protocol is the joint slogan agreed by both parties. Usually, the server starts a session only after receiving the header it recognizes. Of course, this process is indeed realized through socket. If you want to know more about the lower layer, you can look at the link protocol and so on.