cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
2021.12.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

datagramsession/transport.go

13lines · modecode

1package datagramsession
2
3import "github.com/google/uuid"
4
5// Transport is a connection between cloudflared and edge that can multiplex datagrams from multiple sessions
6type transport interface {
7 // SendTo writes payload for a session to the transport
8 SendTo(sessionID uuid.UUID, payload []byte) error
9 // ReceiveFrom reads the next datagram from the transport
10 ReceiveFrom() (uuid.UUID, []byte, error)
11 // Max transmission unit of the transport
12 MTU() uint
13}
14