mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-07 06:07:36 +03:00
* refactor the framer to pack both control and STREAM frames * refactor framer STREAM frame packing logic * pack STREAM_DATA_BLOCKED in the same packet as the STREAM frame This makes debugging easier (and is slightly more efficient). In the pathological case where there is not enough space remaning in the packet to pack the STREAM_DATA_BLOCKED frame, it is queued for the next packet. * add an integration test
121 lines
4.1 KiB
Go
121 lines
4.1 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/quic-go/quic-go (interfaces: FrameSource)
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/quic-go/quic-go -destination mock_frame_source_test.go github.com/quic-go/quic-go FrameSource
|
|
//
|
|
|
|
// Package quic is a generated GoMock package.
|
|
package quic
|
|
|
|
import (
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
ackhandler "github.com/quic-go/quic-go/internal/ackhandler"
|
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockFrameSource is a mock of FrameSource interface.
|
|
type MockFrameSource struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockFrameSourceMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockFrameSourceMockRecorder is the mock recorder for MockFrameSource.
|
|
type MockFrameSourceMockRecorder struct {
|
|
mock *MockFrameSource
|
|
}
|
|
|
|
// NewMockFrameSource creates a new mock instance.
|
|
func NewMockFrameSource(ctrl *gomock.Controller) *MockFrameSource {
|
|
mock := &MockFrameSource{ctrl: ctrl}
|
|
mock.recorder = &MockFrameSourceMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockFrameSource) EXPECT() *MockFrameSourceMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Append mocks base method.
|
|
func (m *MockFrameSource) Append(arg0 []ackhandler.Frame, arg1 []ackhandler.StreamFrame, arg2 protocol.ByteCount, arg3 time.Time, arg4 protocol.Version) ([]ackhandler.Frame, []ackhandler.StreamFrame, protocol.ByteCount) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Append", arg0, arg1, arg2, arg3, arg4)
|
|
ret0, _ := ret[0].([]ackhandler.Frame)
|
|
ret1, _ := ret[1].([]ackhandler.StreamFrame)
|
|
ret2, _ := ret[2].(protocol.ByteCount)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// Append indicates an expected call of Append.
|
|
func (mr *MockFrameSourceMockRecorder) Append(arg0, arg1, arg2, arg3, arg4 any) *MockFrameSourceAppendCall {
|
|
mr.mock.ctrl.T.Helper()
|
|
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Append", reflect.TypeOf((*MockFrameSource)(nil).Append), arg0, arg1, arg2, arg3, arg4)
|
|
return &MockFrameSourceAppendCall{Call: call}
|
|
}
|
|
|
|
// MockFrameSourceAppendCall wrap *gomock.Call
|
|
type MockFrameSourceAppendCall struct {
|
|
*gomock.Call
|
|
}
|
|
|
|
// Return rewrite *gomock.Call.Return
|
|
func (c *MockFrameSourceAppendCall) Return(arg0 []ackhandler.Frame, arg1 []ackhandler.StreamFrame, arg2 protocol.ByteCount) *MockFrameSourceAppendCall {
|
|
c.Call = c.Call.Return(arg0, arg1, arg2)
|
|
return c
|
|
}
|
|
|
|
// Do rewrite *gomock.Call.Do
|
|
func (c *MockFrameSourceAppendCall) Do(f func([]ackhandler.Frame, []ackhandler.StreamFrame, protocol.ByteCount, time.Time, protocol.Version) ([]ackhandler.Frame, []ackhandler.StreamFrame, protocol.ByteCount)) *MockFrameSourceAppendCall {
|
|
c.Call = c.Call.Do(f)
|
|
return c
|
|
}
|
|
|
|
// DoAndReturn rewrite *gomock.Call.DoAndReturn
|
|
func (c *MockFrameSourceAppendCall) DoAndReturn(f func([]ackhandler.Frame, []ackhandler.StreamFrame, protocol.ByteCount, time.Time, protocol.Version) ([]ackhandler.Frame, []ackhandler.StreamFrame, protocol.ByteCount)) *MockFrameSourceAppendCall {
|
|
c.Call = c.Call.DoAndReturn(f)
|
|
return c
|
|
}
|
|
|
|
// HasData mocks base method.
|
|
func (m *MockFrameSource) HasData() bool {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "HasData")
|
|
ret0, _ := ret[0].(bool)
|
|
return ret0
|
|
}
|
|
|
|
// HasData indicates an expected call of HasData.
|
|
func (mr *MockFrameSourceMockRecorder) HasData() *MockFrameSourceHasDataCall {
|
|
mr.mock.ctrl.T.Helper()
|
|
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockFrameSource)(nil).HasData))
|
|
return &MockFrameSourceHasDataCall{Call: call}
|
|
}
|
|
|
|
// MockFrameSourceHasDataCall wrap *gomock.Call
|
|
type MockFrameSourceHasDataCall struct {
|
|
*gomock.Call
|
|
}
|
|
|
|
// Return rewrite *gomock.Call.Return
|
|
func (c *MockFrameSourceHasDataCall) Return(arg0 bool) *MockFrameSourceHasDataCall {
|
|
c.Call = c.Call.Return(arg0)
|
|
return c
|
|
}
|
|
|
|
// Do rewrite *gomock.Call.Do
|
|
func (c *MockFrameSourceHasDataCall) Do(f func() bool) *MockFrameSourceHasDataCall {
|
|
c.Call = c.Call.Do(f)
|
|
return c
|
|
}
|
|
|
|
// DoAndReturn rewrite *gomock.Call.DoAndReturn
|
|
func (c *MockFrameSourceHasDataCall) DoAndReturn(f func() bool) *MockFrameSourceHasDataCall {
|
|
c.Call = c.Call.DoAndReturn(f)
|
|
return c
|
|
}
|