willardf / Hazel-Networking

Hazel Networking is a low level networking library for C# providing connection-oriented, message-based communication via RUDP.
MIT License
385 stars 60 forks source link

Convert Send to return type and misc cleanup #47

Closed willardf closed 2 years ago

willardf commented 2 years ago

It's been an obnoxious feature that Send throws when not connection. In my experience, the common pattern is just to silently ignore throws from send. But occasionally, senders will want to clean up connection state or similar, so I gave Send a return type.

While doing this, I pushed ILogger into the UnityListener and Connection classes and deleted SendBytes which really no one should be using since it's less efficient than Send.