When writing user-provided binary data, we have two cases: 1. If the user data is small and fits in our write buffer, we copy it there just like any other value. 2. If it's bigger than the buffer, we flush the buffer and then write the user data directly to the socket. The logic is to minimize system calls/TCP packets for small user data, but bypass the internal buffer for larger data (saving the in-memory copying). The direct write mechanism is currently implemented synchronously with no async option.
Activity
Work around binary writing support
Work around binary writing support (#2445)
roji commentedon Oct 7, 2020
This was already done for 4.1 in 951dc83