Protocol / Batch Design Questions

I am looking for a protocol design for a client-server application and need some links to some resources that can help me.

Most of it is that I am trying to create my own package format so that I can minimize the amount of information sent. I am looking for some resources to analyze their protocol, but it seems that some do not have packet design at all, like SMTP (which just sends the lines completed by CLRF). What are the advantages / disadvantages of using a system such as SMTP in a system using a specially designed package? Is it possible to use SMTP with just a couple of bytes to cover all commands with bit flags and conserve bandwidth / space?

Just trying to get around all this.

+3
source share
4 answers

True, but SMTP has not been particularly optimized for use in space, and it is not a packet protocol. It sits on top of TCP and uses TCP streaming features. You need to decide what is desirable in your protocol: performance sensitivity? delay? bandwidth?

Do I need to work as superuser? If not, you probably want to use UDP or TCP.

Do you need warranty on delivery? If so, TCP is probably your best bet if you are not dealing with fairly extreme performance or size issues.

, , TCP, , , UDP.

, , , TCP. TCP , .

+1

, (, RTP UDP) (, HTTP/SMTP)?

, : , /, , , , /, .

: , /, ..

+1

SMTP, HTTP TCP , . .

...

sniffing, Wireshark, .

telnet , .

Also with a protocol such as HTTP, the actual resource is usually the communication payload, the resource can be in binary or any other specified format. So having only headings and status in plain text is not bad.

0
source
  • TCP is a stream protocol , not a packet.
  • Using text with lines makes debugging ad hoc easier.
  • Using text with lines allows you to use your protocol with telnet
0
source

Source: https://habr.com/ru/post/1739763/


All Articles