Rename msgpackpp->msgpack, merge device+protocol->wire, absorb picoserial into client

This commit is contained in:
Ian Gulliver
2026-04-04 23:16:25 +09:00
parent 8e550d37db
commit 9f9a1885ae
11 changed files with 170 additions and 185 deletions

View File

@@ -7,19 +7,22 @@ import (
"github.com/theater/picomap/lib/halfsiphash"
"github.com/theater/picomap/lib/msgpack"
"github.com/theater/picomap/lib/transport"
"io"
)
var HashKey = [8]byte{}
type Client struct {
transport transport.Transport
timeout time.Duration
nextID atomic.Uint32
type transport interface {
Send(data []byte) error
SetReadTimeout(timeout time.Duration)
Reader() io.Reader
Close() error
}
func New(t transport.Transport, timeout time.Duration) *Client {
return &Client{transport: t, timeout: timeout}
type Client struct {
transport transport
timeout time.Duration
nextID atomic.Uint32
}
func (c *Client) Close() error {