func NewClientQueue(conn *net.UDPConn, cache *cache.Cache, sq *Sq) *Cq { cq := &Cq{conn: conn, cache: cache, sq: sq, inflight: make(map[string][]chan bool, 0)} cache.RegisterPutCallback(cq.handlePutCallback) return cq }
func NewServerQueue(nc *cache.Cache) *Sq { sq := &Sq{} nc.RegisterVeritfyCallback(sq.handleVerifyCallback) return sq }