add min function
test flags MSG_DONTWAIT for recv in domain client