iOS專案中使用GCDAsyncUdpSocket進行udp通訊,但是在並發的情況下,同時發送6個請求,每次只能收到一個或兩個回應,下面是輸出的日誌訊息,不明白為什麼總是只能收到一個請求的回應
2014-09-11 16:30:13.624 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15d5bb60> gcd;GCDAsyncUdpSocket: 0x15d5bb60> gcd senddata to dpSocket: 0x15d5bb60> gcd senddata to 192. <000633ad 3568>
2014-09-11 16:30:13.629 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15d5d570> gcd send to 192.168.0.143d570> gcd send to 192.168.0.143d570> gcd send to 192.168.0.14309756097020 月1908>
2014-09-11 16:30:13.634 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15e6f4b0> gcd send to 192.168.0.143f4b0> gcd send to 192.168.0.14309750 709702.168.0.14370970 月 69702.168.0.1339702020 97020970505 月 255535990005050505050700057555545555000095; 012820>
2014-09-11 16:30:13.635 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15d5e860> gcd send to 192.168.0.143e860>; 026821>
2014-09-11 16:30:13.638 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15e6fb70> gcd send to 192.168.0.143 fb70> gcd send to 192.168.0.143 fb70> gcd send to 192.168.0.143 fb70> gcd send to 192.168.0.143 fb70> gcd send to 192.168.0.143 fb70>ad 016835>
2014-09-11 16:30:13.640 UDPConcurrent[2553:60b] self is <GCDAsyncUdpSocket: 0x15d5ef20> gcd send to 192.168.0.143 port is 56797 and data is <000753ad 022834>
2014-09-11 16:30:13.643 UDPConcurrent[2553:60b] self.request1 is <GCDAsyncUdpSocket: 0x15d5bb60>
2014-09-11 16:30:13.645 UDPConcurrent[2553:60b] self.request2 is <GCDAsyncUdpSocket: 0x15d5d570>
2014-09-11 16:30:13.647 UDPConcurrent[2553:60b] self.request3 is <GCDAsyncUdpSocket: 0x15e6f4b0>
2014-09-11 16:30:13.649 UDPConcurrent[2553:60b] self.request4 is <GCDAsyncUdpSocket: 0x15d5e860>
2014-09-11 16:30:13.650 UDPConcurrent[2553:60b] self.request5 is <GCDAsyncUdpSocket: 0x15e6fb70>
2014-09-11 16:30:13.652 UDPConcurrent[2553:60b] self.request6 is <GCDAsyncUdpSocket: 0x15d5ef20>
2014-09-11 16:30:13.670 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15d5bb60> port is 49172 and tag is 1
2014-09-11 16:30:13.672 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15d5d570> port is 54971 and tag is 2
2014-09-11 16:30:13.674 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15e6f4b0> port is 55715 and tag is 3
2014-09-11 16:30:13.676 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15d5e860> port is 51186 and tag is 4
2014-09-11 16:30:13.678 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15e6fb70> port is 53467 and tag is 5
2014-09-11 16:30:13.680 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15d5ef20> port is 64005 and tag is 6
2014-09-11 16:30:13.686 UDPConcurrent[2553:60b] socket is <GCDAsyncUdpSocket: 0x15d5ef20> port is 64005 and response data 3 &dltda; 002b0f>
闭关修行中......