Closed srz2 closed 10 years ago
Same thing here... are you going to do something with this?
@srz2 @Dudi00 can you get some logs and post them here? You can enable it by changing #if 0
to #if 1
in GCDAsyncUDPSocket.m file on line 32.
@dvor at line 120 in DDLog.m in NSLogDebug "Called object type 'NSString *' is not a function or function pointer".
I comment line 120, 144 and 567. Then I change line 32 in GCDAsyncUDPSocket from #if 0
to #if 1
but there is no output in console.
ok I "fix it" with little change in macro #define NSLogDebug(frmt, ...) do{ if(DD_DEBUG) NSLog((frmt), ##__VA_ARGS__); } while(0)
to #define NSLogDebug(frmt, ...) do{ if(DD_DEBUG) NSLog(frmt, ##__VA_ARGS__); } while(0)
I have output, but be prepare for long output. I test for two diffrent buffer size 1486 and 47.
iOS 7 buffer 1486 https://gist.github.com/Dudi00/8096469
iOS 6 buffer 1486 https://gist.github.com/Dudi00/8096493
iOS 7 buffer 47 https://gist.github.com/Dudi00/8096505
iOS 6 buffer 47 https://gist.github.com/Dudi00/8096554
if tl;dr problem occurs only under iOS 6 buffer 1486. You can see it in line 125/126 173/174 221/222 381/382 421/422 445/446 473/474 etc. Hope that helps.
Thanks a lot @Dudi00! I'll check those logs ASAP.
@Dudi00 As I understand originally the problem was with socket that eventually wasn't receiving data at all. In your logs socket continues receiving data and everything seems to be okay.
I believe that lag in logs is because of intensive data rate. GCDAsyncUdpSocket starts receiving data right after socket's callback and I don't think that anything can be done for removing the lag.
Thanks @dvor I suspected such a scenario. So recepie for that problem is lower Your buffer @srz2 :)
Closing this issue for now.
Regardless of letting the socket call once or continuously, during a stable connection, it eventually stops receiving data. This is a big problem. I have tried everything from closing the connection to reopening but everything seems to lead to it freezing. Even running through Instruments, it shows the UDP connection terminates.
One thing that might make this a special case is the fact that this is a multicast UDP. Please look into this! I need some sort of help!