upnp

package module
v0.0.0-...-cfeb3e9 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: GPL-3.0 Imports: 14 Imported by: 1

README

fasthttp-upnp

基于 fasthttp 服务的 UPnP 库

使用方法请参考 examples 目录中的 DLNA 示例代码

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIPDenyError

func IsIPDenyError(err error) bool

Types

type DeviceServer

type DeviceServer struct {
	AuthName     string
	MultiDevices []*multiServer

	DeviceType string

	SpecVersion        scpd.SpecVersion
	Manufacturer       string
	ServerName         string
	RootDescNamespaces map[string]string
	UrlPrefix          string

	ServiceList []*service.Controller

	BeforeRequestHandle func(ctx *fasthttp.RequestCtx) bool
	AfterRequestHandle  func(ctx *fasthttp.RequestCtx) bool

	ListenInterface *net.Interface
	ListenPort      uint16

	AllowIps []*net.IPNet
	DenyIps  []*net.IPNet

	ErrorHandler ssdp.ErrorHandler
	InfoHandler  ssdp.InfoHandler
	// contains filtered or unexported fields
}

func NewDeviceServer

func NewDeviceServer(ctx context.Context) (s *DeviceServer, err error)

func (*DeviceServer) AddServer

func (s *DeviceServer) AddServer(name, uuid, root string) string

func (*DeviceServer) Close

func (s *DeviceServer) Close()

func (*DeviceServer) Connection

func (s *DeviceServer) Connection() net.Listener

func (*DeviceServer) DelServer

func (s *DeviceServer) DelServer(uuid string)

func (*DeviceServer) DeviceNamespace

func (s *DeviceServer) DeviceNamespace() string

func (*DeviceServer) DeviceURN

func (s *DeviceServer) DeviceURN() string

func (*DeviceServer) Init

func (s *DeviceServer) Init() (err error)

func (*DeviceServer) Serve

func (s *DeviceServer) Serve() error

type UPnPError

type UPnPError struct {
	Err error
}

func (*UPnPError) Error

func (e *UPnPError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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