frame

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FrameData_TYPE_name = map[int32]string{
	0: "USER_DATA",
	1: "CONN",
	2: "CONNRSP",
	3: "CLOSE",
	4: "HB",
}
View Source
var FrameData_TYPE_value = map[string]int32{
	"USER_DATA": 0,
	"CONN":      1,
	"CONNRSP":   2,
	"CLOSE":     3,
	"HB":        4,
}
View Source
var Frame_TYPE_name = map[int32]string{
	0: "DATA",
	1: "REQ",
	2: "ACK",
	3: "PING",
	4: "PONG",
}
View Source
var Frame_TYPE_value = map[string]int32{
	"DATA": 0,
	"REQ":  1,
	"ACK":  2,
	"PING": 3,
	"PONG": 4,
}

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Type                 int32      `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Resend               bool       `protobuf:"varint,2,opt,name=resend,proto3" json:"resend,omitempty"`
	Sendtime             int64      `protobuf:"varint,3,opt,name=sendtime,proto3" json:"sendtime,omitempty"`
	Id                   int32      `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	Data                 *FrameData `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	Dataid               []int32    `protobuf:"varint,6,rep,packed,name=dataid,proto3" json:"dataid,omitempty"`
	Acked                bool       `protobuf:"varint,7,opt,name=acked,proto3" json:"acked,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*Frame) Descriptor

func (*Frame) Descriptor() ([]byte, []int)

func (*Frame) GetAcked

func (m *Frame) GetAcked() bool

func (*Frame) GetData

func (m *Frame) GetData() *FrameData

func (*Frame) GetDataid

func (m *Frame) GetDataid() []int32

func (*Frame) GetId

func (m *Frame) GetId() int32

func (*Frame) GetResend

func (m *Frame) GetResend() bool

func (*Frame) GetSendtime

func (m *Frame) GetSendtime() int64

func (*Frame) GetType

func (m *Frame) GetType() int32

func (*Frame) ProtoMessage

func (*Frame) ProtoMessage()

func (*Frame) Reset

func (m *Frame) Reset()

func (*Frame) String

func (m *Frame) String() string

func (*Frame) XXX_DiscardUnknown

func (m *Frame) XXX_DiscardUnknown()

func (*Frame) XXX_Marshal

func (m *Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Frame) XXX_Merge

func (m *Frame) XXX_Merge(src proto.Message)

func (*Frame) XXX_Size

func (m *Frame) XXX_Size() int

func (*Frame) XXX_Unmarshal

func (m *Frame) XXX_Unmarshal(b []byte) error

type FrameData

type FrameData struct {
	Type                 int32    `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Compress             bool     `protobuf:"varint,3,opt,name=compress,proto3" json:"compress,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FrameData) Descriptor

func (*FrameData) Descriptor() ([]byte, []int)

func (*FrameData) GetCompress

func (m *FrameData) GetCompress() bool

func (*FrameData) GetData

func (m *FrameData) GetData() []byte

func (*FrameData) GetType

func (m *FrameData) GetType() int32

func (*FrameData) ProtoMessage

func (*FrameData) ProtoMessage()

func (*FrameData) Reset

func (m *FrameData) Reset()

func (*FrameData) String

func (m *FrameData) String() string

func (*FrameData) XXX_DiscardUnknown

func (m *FrameData) XXX_DiscardUnknown()

func (*FrameData) XXX_Marshal

func (m *FrameData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FrameData) XXX_Merge

func (m *FrameData) XXX_Merge(src proto.Message)

func (*FrameData) XXX_Size

func (m *FrameData) XXX_Size() int

func (*FrameData) XXX_Unmarshal

func (m *FrameData) XXX_Unmarshal(b []byte) error

type FrameData_TYPE

type FrameData_TYPE int32
const (
	FrameData_USER_DATA FrameData_TYPE = 0
	FrameData_CONN      FrameData_TYPE = 1
	FrameData_CONNRSP   FrameData_TYPE = 2
	FrameData_CLOSE     FrameData_TYPE = 3
	FrameData_HB        FrameData_TYPE = 4
)

func (FrameData_TYPE) EnumDescriptor

func (FrameData_TYPE) EnumDescriptor() ([]byte, []int)

func (FrameData_TYPE) String

func (x FrameData_TYPE) String() string

type FrameMgr

type FrameMgr struct {
	// contains filtered or unexported fields
}

func NewFrameMgr

func NewFrameMgr(frame_max_size int, frame_max_id int, buffersize int, windowsize int, resend_timems int, compress int, openstat int) *FrameMgr

func (*FrameMgr) Close

func (fm *FrameMgr) Close()

func (*FrameMgr) Connect

func (fm *FrameMgr) Connect()

func (*FrameMgr) GetRecvBufferSize

func (fm *FrameMgr) GetRecvBufferSize() int

func (*FrameMgr) GetRecvReadLineBuffer

func (fm *FrameMgr) GetRecvReadLineBuffer() []byte

func (*FrameMgr) GetSendBufferLeft

func (fm *FrameMgr) GetSendBufferLeft() int

func (*FrameMgr) GetSendList

func (fm *FrameMgr) GetSendList() *list.List

func (*FrameMgr) IsConnected

func (fm *FrameMgr) IsConnected() bool

func (*FrameMgr) IsHBTimeout

func (fm *FrameMgr) IsHBTimeout() bool

func (*FrameMgr) IsRemoteClosed

func (fm *FrameMgr) IsRemoteClosed() bool

func (*FrameMgr) MarshalFrame

func (fm *FrameMgr) MarshalFrame(f *Frame) ([]byte, error)

func (*FrameMgr) OnRecvFrame

func (fm *FrameMgr) OnRecvFrame(f *Frame)

func (*FrameMgr) SetCongestion

func (fm *FrameMgr) SetCongestion(ct congestion.Congestion)

func (*FrameMgr) SetDebugid

func (fm *FrameMgr) SetDebugid(debugid string)

func (*FrameMgr) SkipRecvBuffer

func (fm *FrameMgr) SkipRecvBuffer(size int)

func (*FrameMgr) Update

func (fm *FrameMgr) Update() bool

func (*FrameMgr) WriteSendBuffer

func (fm *FrameMgr) WriteSendBuffer(data []byte)

type FrameStat

type FrameStat struct {
	// contains filtered or unexported fields
}

type Frame_TYPE

type Frame_TYPE int32
const (
	Frame_DATA Frame_TYPE = 0
	Frame_REQ  Frame_TYPE = 1
	Frame_ACK  Frame_TYPE = 2
	Frame_PING Frame_TYPE = 3
	Frame_PONG Frame_TYPE = 4
)

func (Frame_TYPE) EnumDescriptor

func (Frame_TYPE) EnumDescriptor() ([]byte, []int)

func (Frame_TYPE) String

func (x Frame_TYPE) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL