Joke Collection Website - Public benefit messages - Some questions about the overview of C# serial port

Some questions about the overview of C# serial port

1. According to the size of WriteBufferSize, it is automatically sent in segments, and the data will not be discarded.

2. According to the size of the ReadBufferSize, it will automatically read in segments and will not discard the data;

The overflow you suspect during reading and sending is related to the size of the buffer allocated by the serial driver;

It should also be related to the system memory size. C# encapsulates overflow handling, so let's use it.

3. Split and send large files. According to your own situation, divide the files, such as 4K size;

When the sender sends 4k at a time, the receiver starts to receive data and count the number of bytes. When receiving 4k, the receiver

Send the instruction of receiving 4K to the sender, and the sender starts to send the second piece of data, and so on.