mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-29 00:19:58 +00:00
TUN-5301: Separate datagram multiplex and session management logic from quic connection logic
This commit is contained in:

committed by
Arég Harutyunyan

parent
dd32dc1364
commit
eea3d11e40
11
datagramsession/transport.go
Normal file
11
datagramsession/transport.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user