Documentation ¶
Index ¶
- Variables
- func GetTNet() *netstack.Net
- func GetTUNAddress() string
- func ReadEnvelope(connection net.Conn) (*pb.Envelope, error)
- func WGConnect(address string, port uint16) (net.Conn, *device.Device, error)
- func WriteEnvelope(connection net.Conn, envelope *pb.Envelope) error
- func WritePing(connection net.Conn) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PingInterval = 2 * time.Minute
)
Functions ¶
func ReadEnvelope ¶
ReadEnvelope - Reads a message from the wireguard connection using length prefix framing
func WriteEnvelope ¶
WriteEnvelope - Writes a message to the wireguard socket using length prefix framing which is a fancy way of saying we write the length of the message then the message e.g. [uint32 length|message] so the receiver can delimit messages properly
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.