<div dir="ltr"><div>Hi,</div><div><br></div><div>I'm writing a simple wrapper around the socket nif to test the performance compared to gen_udp.</div><div>My questions are specific to UDP sockets.<br></div><div><br></div><div>How do the socket rcvbuf and the otp rcvbuf relate to each other?<br></div><div>
The 'rcvbuf' with level = socket is the size of the OS level receive buffer.<br>
The 'rcvbuf' with level = otp is the size of the buffer "we" read into when we read data (with recv/recvfrom/recvmsg).</div><div>If UDP MTU is 1500 bytes, what happens if the socket rcvbuf=MTU or rcvbuf=MTU*N?</div><div>Should the otp rcvbuf be equal to the socket rcvbuf or larger? What's the difference?<br></div><div>What happen if the wrapper module doesn't read messages fast enough from the socket nif?</div><div><br></div><div>Does
<span class="gmail-bold_code gmail-bc-4">sndbuf</span> have any effect on UDP sockets?</div><div>Should the wrapper module queue packets if the sndbuf is full and resend when possible or should it just drop packets?</div><div><br></div><div>What's the difference between recv, recvfrom, recvmsg and similarly send, sendmsg, sendto?</div><div><br></div><div>Is it relatively safe to use the socket module in production?</div><div>What should I be careful about when implementing the udp wrapper module?<br></div><div><br></div><div>Thanks<br></div><div><br></div><div><br></div><div><br></div><div><br>
</div></div>