stunclient

package
v0.0.0-...-61b8474 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 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 ChangedAddress

type ChangedAddress struct {
	IP   net.IP
	Port int
}

ChangedAddress 是用于解析 CHANGED-ADDRESS 属性的自定义类型。

func (*ChangedAddress) GetFrom

func (s *ChangedAddress) GetFrom(message *stun.Message) error

type STUNClient

type STUNClient interface {
	XORMappedAddress() (*udp.Addr, error)

	MappedAddress() (*udp.Addr, error)

	ChangedAddress() (*udp.Addr, error)

	OtherAddress() (*udp.Addr, error)

	ExternalAddr() (*udp.Addr, error)

	ExternalAddrs() ([]*udp.Addr, error)

	Close() error
}

STUNClient 是一个用于与 STUN 服务器通信的接口。

func NewClient

func NewClient(stunURI string) (STUNClient, error)

Jump to

Keyboard shortcuts

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