Documentation ¶
Index ¶
- func ConvertTo(m *Message) (*message.Message, error)
- type Message
- func (r *Message) Context() context.Context
- func (r *Message) IsModified() bool
- func (r *Message) IsSeparate() bool
- func (r *Message) Marshal() ([]byte, error)
- func (r *Message) MessageID() uint16
- func (r *Message) Reset()
- func (r *Message) SetMessageID(mid uint16)
- func (r *Message) SetModified(b bool)
- func (r *Message) SetType(typ udp.Type)
- func (r *Message) String() string
- func (r *Message) Type() udp.Type
- func (r *Message) Unmarshal(data []byte) (int, error)
- func (r *Message) UpsertMessageID(mid uint16) uint16
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
func (*Message) IsModified ¶
func (*Message) IsSeparate ¶
func (*Message) SetMessageID ¶
func (*Message) SetModified ¶
func (*Message) UpsertMessageID ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) AcquireMessage ¶
AcquireMessage returns an empty Message instance from Message pool.
The returned Message instance may be passed to ReleaseMessage when it is no longer needed. This allows Message recycling, reduces GC pressure and usually improves performance.
func (*Pool) ConvertFrom ¶
ConvertFrom converts common message to pool message.
func (*Pool) ReleaseMessage ¶
ReleaseMessage returns req acquired via AcquireMessage to Message pool.
It is forbidden accessing req and/or its' members after returning it to Message pool.
Click to show internal directories.
Click to hide internal directories.