I want to write a program based on UDP, and send something to anther phone(it runs an application and binded with the port i use),

My problem is:
1. if I don't have any wireless network, can I send successfully? Can it make a connection automatically when the application
started?
2. if there is a wireless network, am I must to choose an IAP first then send?
3. I used RSocketServ and Rsocket to implement this program,didn't use RConnection,so there is no IAP choosing, Is this correct or not?

can anybody know these issue? thanks~~