I am trying to connect an iOS device with a server trough TCP. I am currently using the function CFStreamCreatePairWithSocketToHost. My problem is that i want to set the local port that the iOS device needs to use. Is there anyone who has experience with this and could tell me how to do this?
Share
I have found the answer.
I am now using the cocoaasyncsocket library.
Connecting with a host using the function connectToAddress: viaInterfaceAddress: withTimeout: error: gave me the possibility to define my local port.