I am using AF\_UNIX,SOCK\_STREAM socket for IPC between 2 different processes. The client is sending data over the socket which the server picks up and processes. The size of each block of data that the client writes to the socket is roughly 13 kilobytes using the following command:

```
Send Command in client : send(s, txPackDisp, sizeof(float)*PACKET_LENGTH, 0);

```

However, when I receive the data on the server using the following command : 

```
Receive command in server : recv(s, bfoData, PACKET_LENGTH*sizeof(float),0);

```

the data received everytime is only partial of what I send (there are a lot of zeros in the end which should not be the case).

So my questions are : 

1. Is there a limit on the maximum limit on the size of data that I can send over the AF\_UNIX,SOCK\_STREAM socket ( from what I have read , I dont think there is )
2. Does the socket break up the data into smaller blocks when transferring and if thats the case do I need to receive the smaller blocks individually or as single block like I am doing right now.
3. Will it be better to use AF\_UNIX,SOCK\_DGRAM socket here.

P.S : The source code for the main functions for the server and client can be seen in this question : [IPC using Unix Domain Sockets](https://stackoverflow.com/questions/24030591/ipc-using-unix-domain-sockets)