Documentation ¶
Index ¶
- Variables
- type Conn
- type ConnectEventHandler
- type DisconnectEventHandler
- type Envelope
- type Event
- func (slf *Event) OnConnectEvent(conn Conn)
- func (slf *Event) OnDisconnectEvent(conn Conn)
- func (slf *Event) OnReceiveEvent(conn Conn, msg []byte, typ int)
- func (slf *Event) OnStartEvent()
- func (slf *Event) OnStopEvent()
- func (slf *Event) RegConnectEvent(handler ConnectEventHandler)
- func (slf *Event) RegDisconnectEvent(handler DisconnectEventHandler)
- func (slf *Event) RegReceiveEvent(handler ReceiveEventHandler)
- func (slf *Event) RegStartEvent(handler StartEventHandler)
- func (slf *Event) RegStopEvent(handler StopEventHandler)
- type NetPacketMessage
- func (m *NetPacketMessage) CloneMessageVT() proto.Message
- func (m *NetPacketMessage) CloneVT() *NetPacketMessage
- func (*NetPacketMessage) Descriptor() ([]byte, []int)deprecated
- func (this *NetPacketMessage) EqualMessageVT(thatMsg proto.Message) bool
- func (this *NetPacketMessage) EqualVT(that *NetPacketMessage) bool
- func (x *NetPacketMessage) GetData() []byte
- func (x *NetPacketMessage) GetId() int32
- func (m *NetPacketMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *NetPacketMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
- func (m *NetPacketMessage) MarshalToVT(dAtA []byte) (int, error)
- func (m *NetPacketMessage) MarshalToVTStrict(dAtA []byte) (int, error)
- func (m *NetPacketMessage) MarshalVT() (dAtA []byte, err error)
- func (m *NetPacketMessage) MarshalVTStrict() (dAtA []byte, err error)
- func (*NetPacketMessage) ProtoMessage()
- func (x *NetPacketMessage) ProtoReflect() protoreflect.Message
- func (x *NetPacketMessage) Reset()
- func (m *NetPacketMessage) SizeVT() (n int)
- func (x *NetPacketMessage) String() string
- func (m *NetPacketMessage) UnmarshalVT(dAtA []byte) error
- type ReceiveEventHandler
- type RunMode
- type Server
- type StartEventHandler
- type StopEventHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
View Source
var File_packet_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ConnectEventHandler ¶
type DisconnectEventHandler ¶
type Event ¶
type Event struct { Server StartEventHandler StartEventHandler StopEventHandler StopEventHandler ConnectEventHandler ConnectEventHandler DisconnectEventHandler DisconnectEventHandler ReceiveEventHandler ReceiveEventHandler }
func (*Event) OnConnectEvent ¶
func (*Event) OnDisconnectEvent ¶
func (*Event) OnStartEvent ¶
func (slf *Event) OnStartEvent()
func (*Event) OnStopEvent ¶
func (slf *Event) OnStopEvent()
func (*Event) RegConnectEvent ¶
func (slf *Event) RegConnectEvent(handler ConnectEventHandler)
func (*Event) RegDisconnectEvent ¶
func (slf *Event) RegDisconnectEvent(handler DisconnectEventHandler)
func (*Event) RegReceiveEvent ¶
func (slf *Event) RegReceiveEvent(handler ReceiveEventHandler)
func (*Event) RegStartEvent ¶
func (slf *Event) RegStartEvent(handler StartEventHandler)
func (*Event) RegStopEvent ¶
func (slf *Event) RegStopEvent(handler StopEventHandler)
type NetPacketMessage ¶
type NetPacketMessage struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*NetPacketMessage) CloneMessageVT ¶
func (m *NetPacketMessage) CloneMessageVT() proto.Message
func (*NetPacketMessage) CloneVT ¶
func (m *NetPacketMessage) CloneVT() *NetPacketMessage
func (*NetPacketMessage) Descriptor
deprecated
func (*NetPacketMessage) Descriptor() ([]byte, []int)
Deprecated: Use NetPacketMessage.ProtoReflect.Descriptor instead.
func (*NetPacketMessage) EqualMessageVT ¶
func (this *NetPacketMessage) EqualMessageVT(thatMsg proto.Message) bool
func (*NetPacketMessage) EqualVT ¶
func (this *NetPacketMessage) EqualVT(that *NetPacketMessage) bool
func (*NetPacketMessage) GetData ¶
func (x *NetPacketMessage) GetData() []byte
func (*NetPacketMessage) GetId ¶
func (x *NetPacketMessage) GetId() int32
func (*NetPacketMessage) MarshalToSizedBufferVT ¶
func (m *NetPacketMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*NetPacketMessage) MarshalToSizedBufferVTStrict ¶
func (m *NetPacketMessage) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)
func (*NetPacketMessage) MarshalToVT ¶
func (m *NetPacketMessage) MarshalToVT(dAtA []byte) (int, error)
func (*NetPacketMessage) MarshalToVTStrict ¶
func (m *NetPacketMessage) MarshalToVTStrict(dAtA []byte) (int, error)
func (*NetPacketMessage) MarshalVT ¶
func (m *NetPacketMessage) MarshalVT() (dAtA []byte, err error)
func (*NetPacketMessage) MarshalVTStrict ¶
func (m *NetPacketMessage) MarshalVTStrict() (dAtA []byte, err error)
func (*NetPacketMessage) ProtoMessage ¶
func (*NetPacketMessage) ProtoMessage()
func (*NetPacketMessage) ProtoReflect ¶
func (x *NetPacketMessage) ProtoReflect() protoreflect.Message
func (*NetPacketMessage) Reset ¶
func (x *NetPacketMessage) Reset()
func (*NetPacketMessage) SizeVT ¶
func (m *NetPacketMessage) SizeVT() (n int)
func (*NetPacketMessage) String ¶
func (x *NetPacketMessage) String() string
func (*NetPacketMessage) UnmarshalVT ¶
func (m *NetPacketMessage) UnmarshalVT(dAtA []byte) error
type ReceiveEventHandler ¶
type RunMode ¶
const ( RunModeDev RunMode = log.RunModeDev RunModeTest RunMode = log.RunModeTest RunModeProd RunMode = log.RunModeProd )
type Server ¶
type Server interface { actor.Base Addr() string Protocol() string Start() error Stop() error RegStartEvent(handler StartEventHandler) RegStopEvent(handler StopEventHandler) RegConnectEvent(handler ConnectEventHandler) RegReceiveEvent(handler ReceiveEventHandler) RegDisconnectEvent(handler DisconnectEventHandler) OnStartEvent() OnStopEvent() OnConnectEvent(conn Conn) OnDisconnectEvent(conn Conn) OnReceiveEvent(conn Conn, msg []byte, typ int) }
type StartEventHandler ¶
type StartEventHandler func(srv Server)
type StopEventHandler ¶
type StopEventHandler func(srv Server)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.