cloudflare/cloudflared
Publicmirrored from https://github.com/cloudflare/cloudflaredAvailable
datagramsession/transport.go
13lines · modecode
| 1 | package datagramsession |
| 2 | |
| 3 | import "github.com/google/uuid" |
| 4 | |
| 5 | // Transport is a connection between cloudflared and edge that can multiplex datagrams from multiple sessions |
| 6 | type 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 | |