Documentation ¶
Index ¶
- Variables
- type Endpoint
- type FragmentCallback
- type RelayClientGetter
- type Tunnel
- func (t *Tunnel) Cipher() noise.Cipher
- func (t *Tunnel) Close()
- func (t *Tunnel) IsDisco() bool
- func (t *Tunnel) OnUDPPacket(udpConn *net.UDPConn, data []byte)
- func (t *Tunnel) ReachableEndpoint() *Endpoint
- func (t *Tunnel) SetLocalEndpoints(endpoints []string)
- func (t *Tunnel) SetRemoteEndpoints(endpoints []string)
- func (t *Tunnel) Write(data []byte)
- type UDPPacketCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var ZeroTime = time.Time{}
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint represents the record of discovering peerinfo via message.PacketType_Discovery.
type FragmentCallback ¶
type FragmentCallback interface { // OnFragment will be called if there are fragments received from the // low-level mesh network. OnFragment(data []byte) }
FragmentCallback represents the callback of receiving fragment data.
type RelayClientGetter ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel represents the remote conn and maintain the conn state.
func (*Tunnel) OnUDPPacket ¶
OnUDPPacket implements the UDPPacketCallback interface. Which handles all UDP packets received from all tunnels.
func (*Tunnel) ReachableEndpoint ¶
func (*Tunnel) SetLocalEndpoints ¶
func (*Tunnel) SetRemoteEndpoints ¶
type UDPPacketCallback ¶
type UDPPacketCallback interface { // OnUDPPacket will be called if there are UDP packets received from // the low-level UDPConn connections. OnUDPPacket(udpConn *net.UDPConn, data []byte) }
UDPPacketCallback represents the callback of UDP packets. There are two ways to read UDP packets: 1. UDP packets from relay server (PacketConnect/PacketFragment/Other system packets). 2. UDP packets from peers (PacketKeepalive/PacketFragment).
Click to show internal directories.
Click to hide internal directories.