Replies: 2 comments 2 replies
-
|
Pull requests are welcome if you want to implement this :) |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Looks like it's already been done in main |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
You can avoid boxing of structs if you write packets using constrained generics:
Something like the following definitions:
This would completely avoid allocations or boxing of the struct if the constraints are kept wherever it's passed.
With unmanaged constraint you could write the whole struct in one go to the stream, but I'm not sure it's available.
It's possibly pretty important considering the impact of allocations might have on syncing.
Beta Was this translation helpful? Give feedback.
All reactions