Documentation ¶
Index ¶
- Variables
- func SetModifyDiscoConfig(modify func(cfg *DiscoConfig))
- type DiscoConfig
- type PeerState
- type PeerStore
- type UDPConfig
- type UDPConn
- func (c *UDPConn) Broadcast(b []byte) (peerCount int, err error)
- func (c *UDPConn) Close() error
- func (c *UDPConn) Datagrams() <-chan *disco.Datagram
- func (c *UDPConn) DetectNAT(stunServers []string) (info disco.NATInfo)
- func (c *UDPConn) GenerateLocalAddrsSends(peerID disco.PeerID, stunServers []string)
- func (c *UDPConn) NATEvents() <-chan *disco.NATInfo
- func (c *UDPConn) Peers() (peers []PeerState)
- func (c *UDPConn) RestartListener() error
- func (c *UDPConn) RoundTripSTUN(stunServer string) (*net.UDPAddr, error)
- func (c *UDPConn) RunDiscoMessageSendLoop(udpAddr disco.PeerUDPAddr)
- func (c *UDPConn) SetReadBuffer(bytes int) error
- func (c *UDPConn) SetWriteBuffer(bytes int) error
- func (c *UDPConn) UDPAddrSends() <-chan *disco.PeerUDPAddr
- func (c *UDPConn) WriteToUDP(p []byte, peerID disco.PeerID) (int, error)
- type WSConn
- func (c *WSConn) Close() error
- func (c *WSConn) Datagrams() <-chan *disco.Datagram
- func (c *WSConn) LeadDisco(peerID disco.PeerID) error
- func (c *WSConn) Peers() <-chan *disco.Peer
- func (c *WSConn) PeersUDPAddrs() <-chan *disco.PeerUDPAddr
- func (c *WSConn) Read(p []byte) (n int, err error)
- func (c *WSConn) Register(ctr disco.Controller)
- func (c *WSConn) RestartListener() error
- func (c *WSConn) STUNs() []string
- func (c *WSConn) ServerURL() string
- func (c *WSConn) Unregister(ctr disco.Controller)
- func (c *WSConn) UpdateNATInfo(natInfo disco.NATInfo) error
- func (c *WSConn) Write(p []byte) (n int, err error)
- func (c *WSConn) WriteTo(p []byte, peerID disco.PeerID, op disco.ControlCode) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUDPConnNotReady = errors.New("udpConn not ready yet")
)
Functions ¶
func SetModifyDiscoConfig ¶
func SetModifyDiscoConfig(modify func(cfg *DiscoConfig))
Types ¶
type DiscoConfig ¶
type UDPConn ¶
type UDPConn struct {
// contains filtered or unexported fields
}
func (*UDPConn) GenerateLocalAddrsSends ¶
func (*UDPConn) RestartListener ¶
func (*UDPConn) RoundTripSTUN ¶ added in v0.7.6
func (*UDPConn) RunDiscoMessageSendLoop ¶
func (c *UDPConn) RunDiscoMessageSendLoop(udpAddr disco.PeerUDPAddr)
func (*UDPConn) SetReadBuffer ¶
SetReadBuffer sets the size of the operating system's receive buffer associated with the connection.
func (*UDPConn) SetWriteBuffer ¶
SetWriteBuffer sets the size of the operating system's transmit buffer associated with the connection.
func (*UDPConn) UDPAddrSends ¶
func (c *UDPConn) UDPAddrSends() <-chan *disco.PeerUDPAddr
type WSConn ¶
type WSConn struct {
// contains filtered or unexported fields
}
func DialPeermap ¶
func (*WSConn) PeersUDPAddrs ¶
func (c *WSConn) PeersUDPAddrs() <-chan *disco.PeerUDPAddr
func (*WSConn) Register ¶
func (c *WSConn) Register(ctr disco.Controller)
func (*WSConn) RestartListener ¶
func (*WSConn) Unregister ¶
func (c *WSConn) Unregister(ctr disco.Controller)
func (*WSConn) UpdateNATInfo ¶ added in v0.7.9
Click to show internal directories.
Click to hide internal directories.