Code:
If the on sockwrite should not trigger for UDP sockets, how does one prevents filling up the queue? or send more data once the queue is filled. (and prevent getting things like "* /sockudp: 'test' queue would exceed 16384 bytes").

You are quite right, I forgot that I added internal buffer support to UDP as well as TCP. It abstracts away how UDP works for the scripter but because UDP is unreliable, and may or may not report errors, the internal buffer support and SOCKWRITE/UDPWRITE events are of more limited use with UDP. I am still not sure why UDPWRITE was not added to the help file or why SOCKWRITE is triggering in its place. It has been quite a few years since I last looked at the socket code, so I will need to look through it more closely.