Increase UDP buffer size on Mac OS

I've been implementing bi-directional communication for Ableton clips, and I'd like to be able to smoothly update the playing position of a grid view of Ableton clips. I've got the code all working, but after triggering about 3 clips, and receiving playing position updates (which I've already pared down in resolution), my actions from my Open Stage Control script get super laggy (like a command will execute 30 seconds or so later than the button press). I'm guessing that i've hit the UDP buffer size. A few things i've noticed when this happens:

  1. The terminal log output shows that the OSC command is being sent immediately upon button press
  2. The receiving log doesn't show the action as being received until the greatly delayed time.
  3. Sometimes actions are dropped, but mostly, they just lag behind.

If anyone knows how to increase the default UDP buffer size on Mac OS, I'd like to try that and see if that works. I'm directly connected via USB and an adhoc connection, so there should be no bandwidth limitation this small from a hardware perspective. Any suggestions? I can make it work if I further dump the resolution of the playing position updates down, but then it's visually super choppy.

*i've tried sudo sysctl -w net.inet.udp.maxdgram=65535, which doesn't seem to help...

This maybe ? Under "BSD/Darwin": Increase OS UDP Buffers to Improve Performance | by Cameron Sparr | Medium