Is the address you are supplying the device (local) address or the remote?
From here: Network samples? - #8 by Bauland, you may need to put a sleep between
wifi.TurnOn();
and
var id = wifi.OpenSocket("192.168.43.3", 52592, SPWF04SxConnectionyType.Udp, SPWF04SxConnectionSecurityType.None);'
I know in the DNMF there were events to notify the app layer when the network/wifi was ready, and when it was connected/disconnected. Not sure about TinyCLR