Documentation ¶
Index ¶
- type Protocol
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetBody() []byte
- func (m *Request) GetSeq() uint32
- func (m *Request) GetServant() uint32
- func (m *Request) GetUid() uint64
- func (m *Request) GetVersion() uint32
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Respond
- func (*Respond) Descriptor() ([]byte, []int)
- func (m *Respond) GetBody() []byte
- func (m *Respond) GetExtend() []byte
- func (*Respond) ProtoMessage()
- func (m *Respond) Reset()
- func (m *Respond) String() string
- func (m *Respond) XXX_DiscardUnknown()
- func (m *Respond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Respond) XXX_Merge(src proto.Message)
- func (m *Respond) XXX_Size() int
- func (m *Respond) XXX_Unmarshal(b []byte) error
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) GetServant ¶
func (*Request) GetVersion ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
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) ProtoMessage ¶
func (*Respond) ProtoMessage()
func (*Respond) XXX_DiscardUnknown ¶
func (m *Respond) XXX_DiscardUnknown()
func (*Respond) XXX_Marshal ¶
func (*Respond) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.