Using C / C++ socket programming, and the ‘read(socket, buffer, BUFSIZE)’ method. What exactly is the ‘buffer’ I know that char and byte are the same thing, but does it matter how many elements the byte array has in it? Does the buffer need to be able to hold the entire message until the null character?
Using C / C++ socket programming, and the read(socket, buffer, BUFSIZE) method. What exactly
Share
BUFSIZE should be equal to the size of your buffer in bytes. read() will stop reading when the buffer is full. Here is an example: