Documentation ¶
Index ¶
Constants ¶
View Source
const (
PH = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMessageFactoryManager ¶
type IMessageFactoryManager interface { Register(iMsg IMessage, producer messageProducer, recycler messageRecycler) Produce(id MessageID) (IMessage, error) Recycle(iMsg IMessage) error }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
type IMessageHandlerManager ¶
type IMessageHandlerManager interface { Register(id MessageID, handler MessageHandler) Process(iMsg IMessage, args ...interface{}) error }
func NewMessageHandlerManager ¶
func NewMessageHandlerManager() IMessageHandlerManager
type IProtocol ¶
type IProtocol interface { IMessageFactoryManager Encode(i IMessage) ([]byte, error) Decode(data []byte) (IMessage, error) }
func New ¶
func New(allocator p.IAllocator, encryptor p.IEncryptor, decryptor p.IDecryptor) IProtocol
type MessageHandler ¶
type MessageHandler func(IMessage, ...interface{})
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Click to show internal directories.
Click to hide internal directories.