protocol

package
v0.0.0-...-2a177de Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol interface {
	NewCodec(conn net.Conn, timeOut, heartbeat int) interface{}
	Receive(interface{}) (interface{}, interface{}, error, int)
	Send(interface{}, interface{}) error
	Close(interface{}) error
	NoticeClose(interface{})
}

协议接口

type Request

type Request struct {
	Version              uint32   `protobuf:"fixed32,1,opt,name=version,proto3" json:"version,omitempty"`
	Servant              uint32   `protobuf:"fixed32,2,opt,name=servant,proto3" json:"servant,omitempty"`
	Seq                  uint32   `protobuf:"fixed32,3,opt,name=seq,proto3" json:"seq,omitempty"`
	Uid                  uint64   `protobuf:"fixed64,4,opt,name=uid,proto3" json:"uid,omitempty"`
	Body                 []byte   `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The request message containing the user's name.

func (*Request) Descriptor

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

func (*Request) GetBody

func (m *Request) GetBody() []byte

func (*Request) GetSeq

func (m *Request) GetSeq() uint32

func (*Request) GetServant

func (m *Request) GetServant() uint32

func (*Request) GetUid

func (m *Request) GetUid() uint64

func (*Request) GetVersion

func (m *Request) GetVersion() uint32

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type Respond

type Respond struct {
	Body                 []byte   `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	Extend               []byte   `protobuf:"bytes,2,opt,name=extend,proto3" json:"extend,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response message containing the greetings

func (*Respond) Descriptor

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

func (*Respond) GetBody

func (m *Respond) GetBody() []byte

func (*Respond) GetExtend

func (m *Respond) GetExtend() []byte

func (*Respond) ProtoMessage

func (*Respond) ProtoMessage()

func (*Respond) Reset

func (m *Respond) Reset()

func (*Respond) String

func (m *Respond) String() string

func (*Respond) XXX_DiscardUnknown

func (m *Respond) XXX_DiscardUnknown()

func (*Respond) XXX_Marshal

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

func (*Respond) XXX_Merge

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

func (*Respond) XXX_Size

func (m *Respond) XXX_Size() int

func (*Respond) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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