localsend

package
v0.0.0-...-9ccd548 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Alias = "Localsend Discovery"
	// https://github.com/localsend/localsend/blob/6dd28ce661dcf4b30cef47ac1f57a0ce410f0988/lib/constants.dart#L18-L25
	Port           = 53317
	MulticastGroup = "224.0.0.167"
)

Variables

This section is empty.

Functions

func GenerateCert

func GenerateCert(certPath, keyPath string) (fingerprint string, err error)

func GetAlias

func GetAlias() string

func SendHTTP

func SendHTTP(ctx context.Context, target *net.UDPAddr, origin, self Register) error

Types

type Register

type Register struct {
	Alias        string `json:"alias"`
	Version      string `json:"version"`
	DeviceModel  string `json:"deviceModel,omitempty"`
	DeviceType   string `json:"deviceType,omitempty"`
	FingerPrint  string `json:"fingerprint"`
	Port         uint16 `json:"port,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
	Download     bool   `json:"download,omitempty"`
	Announcement bool   `json:"announcement,omitempty"`
	Announce     bool   `json:"announce,omitempty"`
}

{"alias":"...","version":"2.0","deviceModel":"Linux","deviceType":"desktop","fingerprint":"...","port":53317,"protocol":"https","download":false,"announcement":true,"announce":true} {"alias":"...","version":"2.0","deviceModel":"iPhone","deviceType":"mobile","fingerprint":"...","port":53317,"protocol":"https","download":false,"announcement":true,"announce":true}

func (Register) String

func (r Register) String() string

Jump to

Keyboard shortcuts

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