TUN-5301: Separate datagram multiplex and session management logic from quic connection logic

This commit is contained in:
cthuang
2021-11-23 12:45:59 +00:00
committed by Arég Harutyunyan
parent dd32dc1364
commit eea3d11e40
10 changed files with 675 additions and 163 deletions

View File

@@ -0,0 +1,11 @@
package datagramsession
import "github.com/google/uuid"
// Transport is a connection between cloudflared and edge that can multiplex datagrams from multiple sessions
type transport interface {
// SendTo writes payload for a session to the transport
SendTo(sessionID uuid.UUID, payload []byte) error
// ReceiveFrom reads the next datagram from the transport
ReceiveFrom() (uuid.UUID, []byte, error)
}