ADDED:
* iox package
* mapsx package
* netx/inetcksum package
This commit is contained in:
brent saner
2025-12-18 04:47:31 -05:00
parent 6ddfcdb416
commit 145c32268e
19 changed files with 824 additions and 148 deletions

View File

@@ -22,7 +22,7 @@ func (i *InetChecksum) Aligned() (aligned bool) {
defer i.alignLock.Unlock()
i.bufLock.RLock()
aligned = i.buf.Len()&2 == 0
aligned = i.buf.Len()%2 == 0
i.bufLock.RUnlock()
i.aligned = aligned
@@ -113,7 +113,7 @@ func (i *InetChecksum) Reset() {
i.sumLock.Lock()
i.lastLock.Lock()
i.aligned = false
i.aligned = true
i.alignLock.Unlock()
i.buf.Reset()
@@ -308,7 +308,7 @@ func (i *InetChecksum) WriteByte(c byte) (err error) {
}
if !i.disabledBuf {
if err = i.WriteByte(c); err != nil {
if err = i.buf.WriteByte(c); err != nil {
i.sum = origSum
i.aligned = origAligned
i.last = origLast