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 ¶ added in v2.3.0
func (*Message) UpsertMessageID ¶ added in v2.5.0
type Pool ¶ added in v2.5.0
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) AcquireMessage ¶ added in v2.5.0
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 ¶ added in v2.5.0
ConvertFrom converts common message to pool message.
func (*Pool) ReleaseMessage ¶ added in v2.5.0
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.