Documentation ¶
Index ¶
- Variables
- func SetModifyDiscoConfig(modify func(cfg *DiscoConfig))
- type DiscoConfig
- type PeerState
- type PeerStore
- type UDPConfig
- type UDPConn
- 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) RelayTo(relay disco.PeerID, p []byte, peerID disco.PeerID) (int, error)
- func (c *UDPConn) RestartListener() 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) WriteTo(p []byte, peerID disco.PeerID) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MAGIC_TO_RELAY = []byte{'_', 'p', 'g', 1} MAGIC_FROM_RELAY = []byte{'_', 'p', 'g', 3} )
View Source
var ( ErrUDPConnNotReady = errors.New("udpConn not ready yet") ErrUDPConnInactive = errors.New("udpConn inactive") )
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) 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
Click to show internal directories.
Click to hide internal directories.