This might seem a bit simple, but when I'm reading data sent from over RS-232 to be read by my computer, is it reasonable to expect that if the data was sent as a single packet, that the packet will stay whole when I go to read it?
For example, If I send a 32-byte packet of data over the serial port, and this arrives into the serial buffer on my computer, could I safely assume that the data arrives simultaneously? I feel as if, even if the data was sent as a packet, there is a chance that only half of the data might be in the buffer on my computer before I go to read it. Because packets have a certain data "width", I imagine it could create a sort of race condition where the rest of the packet has to arrive before I finish reading the buffer. Especially if the idea of "packet" is interpreted more loosely to mean multiple separate pieces of data that are sent shortly after each other (shortly being something along the lines of for-looping through the data to send and calling the serial write method on it sequentially), as opposed to a single 32-byte data struct which would contain the data.
Thanks in advance for any help you can provide.