DarkRift icon indicating copy to clipboard operation
DarkRift copied to clipboard

Synchronous sockets feature, WIP.

Open 4real opened this issue 2 years ago • 0 comments

Currently implemented inline in bichannel listener & client connection, though it's intended to be separate classes for Unity.

Currently (because I suck) it has a fair number of memory recycling and IDisposable issues that need to be solved. Some threading details are also sketchy.

Motivation for those unaware:

  1. Unity async sockets don't work with clumsy, an important lag simulation tool.
  2. Async sockets in Unity allocate a lot of memory which ends up a performance problem with Unity's GC.
  3. Async sockets tend to simply handle poorly in Unity under high load (in current implementation), with a potential for queuing up infinite requests in memory until something breaks (see point 2).

If someone has a better implementation without bugs, feel free to share it and I can close this one.

4real avatar Dec 23 '22 17:12 4real