I wrote a simple C socket program that sends an INIT package to the server to indicate to prepare a text transfer. The server does not sends any data back at that time. After sending the INIT package the client sends a GET package and waits for chunks of data from the server. So every time the server receives a GET package it will send a chunk of data to the client.
So far so good. The buffer has a size of 512 bytes, a chunk is 100 Bytes plus a little overhead big.
But my problem is that the client does not receive the second message.
So my guess is that read() will blpck until the buffer is full. Is that right or what might be the reason for that?
read()would read whatever it has. It will block only in blocking mode, when there is no data and no other events pending. - Valeri Atamaniouk