Id there any point to having a blocking send? It seems to me that, if the sending thread is at all reliant on the receiver, it would need to receive it's own message from the receiver anyway so I don't see how blocking on send helps.
ismael
Can Unix sockets be used to implement send() and recv()? Or can pipes or channels in IPC be used to implement send() and recv()?
sirej
@zmelnyk blocking sends would be useful if you want to reuse the same buffer that you're sending. if you modify that buffer somehow, you would want to wait until after the send is complete to do so.
@ismael either unix sockets or pipes can be used to implement send() and recv(). The posix standard lets you treat sockets and pipes the same as files, so you can read and write to them the same way you do to a file. pipes would be great for IPC in the same computer, and sockets would be great for IPC as well as network communication.
Id there any point to having a blocking send? It seems to me that, if the sending thread is at all reliant on the receiver, it would need to receive it's own message from the receiver anyway so I don't see how blocking on send helps.