Skip to content

Conversation

@randomblast
Copy link

Partially converted to ARC, for the bound UDP version. I'm not sure what the state is for the other classes - they might not even compile now.

The focus of these changes was on throughput & efficiency, but I also fixed some things which were causing pain in the application I was working on at the time. I actually don't remember the changes that well since I stopped using the library not too long after making them.

joshchngs and others added 22 commits January 22, 2013 10:30
No other scenarios are working yet; none of the TCP or connect()ed UDP is there.

Remove "sent packet" NSLog

Only beginReceiving on bind if continuouslyReceivingPackets

Mark OSCPacket properties @dynamic

We don't want the class @defs to be populated.
Manually construct OSCMessage.arguments array

Still need to make this work with non-float arguments

Implement OSCMessage endianness swapping for int32/int64

Add timestamp to OSCMessage
I wasn't padding the string to 4-byte alignments so all subsequent offsets were wrong.
There is a race condition when clearing the pending packets asynchronously, as this might be done from within a dealloc—the OSCConnection might be gone by the time the block is dispatched.
This was set manually to armv6 & armv7, which causes linking to fail on new devices which use armv7s.
This should allow connectToHost: to work with all protocols.
If we get a bundle larger than GCDAsyncUdpSocket's buffer, the socket will truncate it without warning. This can lead to us trying to read past the end of the buffer based on the bundle's metadata. This patch causes the rest of the bundle to be dropped and only the complete packets returned with the OSCMutableBundle.
The default is set fairly low (~9200b). It might be an idea to expose this configuration so that applications can specify the expected max size of their bundles. 64k is pushing it, and IP fragmentation will already be causing problems of its own.
It's not sufficient to decrement OSCConnection's reference and expect the socket to be deallocated immediately. There could be some retain cycles keeping it alive, and therefore preventing the socket from being unbinded. If the OSCConnection has received disconnect, we can basically guarantee that we want the socket closed.
A little bit of flexibility to drop packets before they're parsed.
Log and return instead. This is a stopgap measure since there's no way to check whether the assertion will fail before calling the method.
Running xcodebuild/xctool directly in the directory will output build
intermediates directly in the repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants