Did some digging in POSIX and it seems to be a SO_SNDLOWAT issue.

Posix states the following:
If a descriptor refers to a socket, the implied output function is the
sendmsg() function supplying an amount of normal data equal to the
current value of the SO_SNDLOWAT option for the socket. If a
non-blocking call to the connect() function has been made for a
socket, and the connection attempt has either succeeded or failed
leaving a pending error, the socket shall be marked as writable.

out manpage:
SO_SNDLOWAT is an option to set the minimum count for output operations.
     Most output operations process all of the data supplied by the call,
     delivering data to the protocol for transmission and blocking as
     necessary for flow control.  Nonblocking output operations will process
     as much data as permitted subject to flow control without blocking, but
     will process no data if flow control does not allow the smaller of the
     low water mark value or the entire request to be processed.

As I'm sending packets with 1472 bytes, kevent/poll is probably
returning a writable state considering when 1024 bytes are available.
I'll give it a try when I get home, this should be enough.

Sorry for the noise.

Reply via email to