protocol

package
v0.0.0-...-88b4fc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProtocolNotSupport = errors.New("protocol not support")
)
View Source
var (
	ParserMap = map[ProtocolType]Parser{
		PQUIC: &QuicParser{},
	}
)

Functions

This section is empty.

Types

type Codec

type Codec struct{}

func NewCodec

func NewCodec() *Codec

func (*Codec) Parse

func (c *Codec) Parse(option *CodecOption) error

type CodecOption

type CodecOption struct {
	FilePath string
	Protocol ProtocolType
}

type Message

type Message interface {
	Display() string
}

type Parser

type Parser interface {
	Parse(io.Reader) (Message, error)
}

func GetParser

func GetParser(p ProtocolType) (Parser, error)

type ProtocolType

type ProtocolType string
const (
	PQUIC ProtocolType = "quic"
	PUDP  ProtocolType = "udp"
)

type QuicMessage

type QuicMessage struct{}

func (*QuicMessage) Display

func (m *QuicMessage) Display() string

type QuicParser

type QuicParser struct{}

func (*QuicParser) Parse

func (p *QuicParser) Parse(r io.Reader) (Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL