ws

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event added in v0.9.0

type Event struct {
	ControlCode disco.ControlCode
	Data        any
}

type WSConn

type WSConn struct {
	// contains filtered or unexported fields
}

func DialPeermap

func DialPeermap(ctx context.Context, server *disco.Server, peerID disco.PeerID, metadata url.Values) (*WSConn, error)

func (*WSConn) Close

func (c *WSConn) Close() error

func (*WSConn) Datagrams

func (c *WSConn) Datagrams() <-chan *disco.Datagram

func (*WSConn) Events added in v0.9.0

func (c *WSConn) Events() <-chan Event

func (*WSConn) LeadDisco

func (c *WSConn) LeadDisco(peerID disco.PeerID) error

func (*WSConn) Read

func (c *WSConn) Read(p []byte) (n int, err error)

func (*WSConn) Register

func (c *WSConn) Register(ctr disco.Controller)

func (*WSConn) RestartListener

func (c *WSConn) RestartListener() error

func (*WSConn) STUNs

func (c *WSConn) STUNs() []string

func (*WSConn) ServerURL

func (c *WSConn) ServerURL() string

func (*WSConn) Unregister

func (c *WSConn) Unregister(ctr disco.Controller)

func (*WSConn) UpdateNATInfo

func (c *WSConn) UpdateNATInfo(natInfo disco.NATInfo) error

func (*WSConn) Write

func (c *WSConn) Write(p []byte) (n int, err error)

func (*WSConn) WriteTo

func (c *WSConn) WriteTo(p []byte, peerID disco.PeerID, op disco.ControlCode) error

Jump to

Keyboard shortcuts

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