Documentation ¶
Index ¶
- Constants
- func Encode(data []byte, m Msg) (int, error)
- func EncodeSize(m Msg) int
- type AbortFunc
- type Action
- type Chunk
- type Conn
- type Data
- type DoneFunc
- type Error
- type Msg
- type MsgAbort
- type MsgAccept
- type MsgAck
- type MsgCancel
- type MsgData
- type MsgDone
- type MsgStart
- type MsgXfer
- type Op
- type ReceiveFunc
- type Receiver
- func (x *Receiver[C]) Handle(conn C, ts time.Duration, m Msg)
- func (x *Receiver[C]) HandleCancel(conn C, m *MsgCancel)
- func (x *Receiver[C]) HandleData(conn C, ts time.Duration, m *MsgData)
- func (x *Receiver[C]) HandleStart(conn C, ts time.Duration, m *MsgStart)
- func (x *Receiver[C]) OnReceive(fnc ReceiveFunc[C])
- func (x *Receiver[C]) Reset(n int)
- func (x *Receiver[C]) Update(ts time.Duration)
- type RecvID
- type SendID
- type Sender
- func (x *Sender[C]) Cancel(conn C, id SendID)
- func (x *Sender[C]) CancelAll(conn C)
- func (x *Sender[C]) Handle(conn C, ts time.Duration, m Msg)
- func (x *Sender[C]) HandleAbort(conn C, m *MsgAbort)
- func (x *Sender[C]) HandleAccept(conn C, m *MsgAccept)
- func (x *Sender[C]) HandleAck(conn C, m *MsgAck)
- func (x *Sender[C]) HandleDone(conn C, m *MsgDone)
- func (x *Sender[C]) Reset(n int)
- func (x *Sender[C]) Send(ctx context.Context, conn C, p Data) error
- func (x *Sender[C]) StartSend(conn C, p Data, onDone DoneFunc, onAbort AbortFunc) (SendID, bool)
- func (x *Sender[C]) Update(ts time.Duration)
- type State
Constants ¶
View Source
const ( OpStart = Op(0) OpAccept = Op(1) OpData = Op(2) OpAck = Op(3) OpDone = Op(4) OpCancel = Op(5) OpAbort = Op(6) )
View Source
const ( ErrClosed = Error(1) ErrSendTimeout = Error(2) ErrRecvTimeout = Error(3) )
Variables ¶
This section is empty.
Functions ¶
func EncodeSize ¶
Types ¶
type MsgAbort ¶
func (*MsgAbort) EncodeSize ¶
type MsgAccept ¶
type MsgAccept struct { RecvID RecvID // use this to send data SendID SendID // accepted send stream }
func (*MsgAccept) EncodeSize ¶
type MsgAck ¶
func (*MsgAck) EncodeSize ¶
type MsgCancel ¶
func (*MsgCancel) EncodeSize ¶
type MsgData ¶
func (*MsgData) EncodeSize ¶
type MsgStart ¶
type MsgStart struct { Act Action Unk1 byte Size uint32 Type binenc.String SendID SendID Unk5 [3]byte }
func (*MsgStart) EncodeSize ¶
type ReceiveFunc ¶
type Receiver ¶
type Receiver[C Conn] struct { // contains filtered or unexported fields }
func (*Receiver[C]) HandleCancel ¶
func (*Receiver[C]) HandleData ¶
func (*Receiver[C]) HandleStart ¶
func (*Receiver[C]) OnReceive ¶
func (x *Receiver[C]) OnReceive(fnc ReceiveFunc[C])
type Sender ¶
type Sender[C Conn] struct { // contains filtered or unexported fields }
func (*Sender[C]) HandleAbort ¶
func (*Sender[C]) HandleAccept ¶
func (*Sender[C]) HandleDone ¶
Click to show internal directories.
Click to hide internal directories.