Reduce dispatch when writing data to a socket.