Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NosLexer ¶
func NosLexer() lexer.Definition
NosLexer returns a lexer instance able to tokenize nostale packets
Types ¶
type NosPacketParser ¶
type NosPacketParser struct {
// contains filtered or unexported fields
}
NosPacketParser provides a collection of methods to parse nostale packets and convert them between different formats or notations. It also holds an initially-empty list of parsable packets.
func (*NosPacketParser) ParseClientPacket ¶
func (p *NosPacketParser) ParseClientPacket(rawPacket string) (packets.NosPacket, error)
ParseClientPacket parses a registered client packet
func (*NosPacketParser) ParseServerPacket ¶
func (p *NosPacketParser) ParseServerPacket(rawPacket string) (packets.NosPacket, error)
ParseServerPacket parses a registered server packet
func (*NosPacketParser) RegisterPacket ¶
func (p *NosPacketParser) RegisterPacket(packet packets.NosPacket) error
RegisterPacket adds a new packet to the list of packets that the parser will be able to parse.
Click to show internal directories.
Click to hide internal directories.