func (h *header) read(e *bin.Encoder) error {
	h.token = packetType(e.ReadByte())
	h.status = e.Uint8()
	h.packetSize = e.Uint16()
	h.spid = e.Uint16()
	h.packetNo = e.Uint8()
	h.pad = e.Uint8()
	err := e.Err()
	return err
}
Read deserializes a PacketHeader struct
package tds
import (
	"bytes"
	"context"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"net"
	"sync/atomic"
	"time"
	bin "github.com/thda/tds/binary"
)
const headerSize = 8
const (
	_ = iota
	eom
	cancelAck
	cancel
)
type header struct {
	token      packetType
	status     uint8
	packetSize uint16
	spid       uint16
	packetNo   uint8
	pad        uint8
}