gortc / stun

Fast RFC 5389 STUN implementation in go
BSD 3-Clause "New" or "Revised" License
494 stars 53 forks source link

errors: allocate only if -debug flag set #44

Closed ernado closed 6 years ago

ernado commented 6 years ago

Introduce new compile flag and implement zero allocation even for error cases via constructor functions.

ernado commented 6 years ago

Most places covered. Further fork seems like premature optimization.