Yes, I think you can.
Since packets are sent individually, although the order they receive is non-deterministic, it already has UDP.
Thus, sending multiple threads on the same socket is wonderful.
Although, if you do other things using a socket, for example bind (), close (), then you may encounter race conditions, so you can be careful.
Markr source share