Sonic is a Go library for network and I/O programming that provides developers with a consistent asynchronous model, with a focus on achieving the lowest possible latency and jitter in Go.
In conn.go and packet.go we allocate on each read/write operation through getReadHandler or getWriteHandler. That is unnecessary. We have a solution in multicast.UDPPeer where instead of allocating a handler each time, we keep a reference to it and change its state on-demand on an async read/write.
In
conn.go
andpacket.go
we allocate on each read/write operation throughgetReadHandler
orgetWriteHandler
. That is unnecessary. We have a solution inmulticast.UDPPeer
where instead of allocating a handler each time, we keep a reference to it and change its state on-demand on an async read/write.