Swift: Receiving UDP packets from server on serial port monitor but not in ios app
问题 I send UDP packets to a wifi module and receive them and i monitor them in serial port monitor successfully but unable to receive them in iOS app. I'm using Network Framework both for connecting and receive. The connection part works perfectly but when i set a listener to the port, and try to get rsponse the receiveMessage doesn't get called although i see outpackets that module sends. class func connect() { connection = NWConnection(host: hostUDP, port: portUDP, using: .udp) connection?