types

package
v0.0.0-...-c04d2a2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address []byte

func New_Address

func New_Address(Type AddressType, Protocol Protocol, Port uint16, Host string) Address

func Serialize_Address

func Serialize_Address(dst Address, Type AddressType, Protocol Protocol, Port uint16, Host string) Address

func (Address) Host

func (s Address) Host() string

func (Address) Port

func (s Address) Port() uint16

func (Address) Protocol

func (s Address) Protocol() Protocol

func (Address) String

func (s Address) String() string

func (Address) Type

func (s Address) Type() AddressType

func (Address) Vstruct_Validate

func (s Address) Vstruct_Validate() bool

type AddressType

type AddressType uint8
const (
	AddressType_IPv4     AddressType = 0
	AddressType_IPv6     AddressType = 1
	AddressType_DNS_A    AddressType = 2
	AddressType_DNS_AAAA AddressType = 3
	AddressType_DNS_SRV  AddressType = 4
)

func (AddressType) Match

func (e AddressType) Match(
	onIPv4 func(),
	onIPv6 func(),
	onDNS_A func(),
	onDNS_AAAA func(),
	onDNS_SRV func(),
)

func (AddressType) MatchS

func (e AddressType) MatchS(s struct {
	onIPv4     func()
	onIPv6     func()
	onDNS_A    func()
	onDNS_AAAA func()
	onDNS_SRV  func()
})

func (AddressType) String

func (e AddressType) String() string

type Protocol

type Protocol uint8
const (
	Protocol_TCP  Protocol = 0
	Protocol_UDP  Protocol = 1
	Protocol_TLS  Protocol = 2
	Protocol_DTLS Protocol = 3
	Protocol_WS   Protocol = 4
	Protocol_WSS  Protocol = 5
	Protocol_QUIC Protocol = 6
)

func (Protocol) Match

func (e Protocol) Match(
	onTCP func(),
	onUDP func(),
	onTLS func(),
	onDTLS func(),
	onWS func(),
	onWSS func(),
	onQUIC func(),
)

func (Protocol) MatchS

func (e Protocol) MatchS(s struct {
	onTCP  func()
	onUDP  func()
	onTLS  func()
	onDTLS func()
	onWS   func()
	onWSS  func()
	onQUIC func()
})

func (Protocol) String

func (e Protocol) String() string

Jump to

Keyboard shortcuts

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