feat(transport): negotiate bounded automatic message chunking
This commit is contained in:
1 parent
474afb3484
commit
8acffac985
20 files changed
+1332
-38
No files matched your search
@@ -126,6 +126,17 @@ func (queue *WriterQueue) Next(ctx context.Context) (Frame, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// TryControl is used only by the sole writer between packets of a data frame.
|
||||
func (queue *WriterQueue) TryControl() (Frame, bool) {
|
||||
select {
|
||||
case frame := <-queue.control:
|
||||
queue.controlRun++
|
||||
return frame, true
|
||||
default:
|
||||
return Frame{}, false
|
||||
}
|
||||
}
|
||||
|
||||
func (queue *WriterQueue) Close() { queue.closeOnce.Do(func() { close(queue.closed) }) }
|
||||
|
||||
type HeartbeatAction uint8
|
||||
|
||||
Reference in new issue
Block a user