I'm just staring with GCDAsyncSocket using swift in IOS, all is working well, however,
I have some code like this:
mySocket = GCDAsyncSocket(delegate: self, delegateQueue: DispatchQueue.main)
try mySocket.connect(toAddress: address)
// this is the one getting called
@objc func socket(_ sock: GCDAsyncSocket, didConnectToHost host: String, port: UInt16) {
print("---> didConnectToHost host: \(host) port: \(port) ")
}
@objc func socket(_ sock: GCDAsyncSocket, didConnectToAddress address: Data) {
print("---> didConnectToAddress ")
}
I was expecting the "didConnectToAddress" to be called but I get "didConnectToHost".
Is this normal?