cloudflare/cloudflared

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
73a265f2fc62c3a4b995fe1a478d46a79b09a404

Branches

Tags

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

Clone

HTTPS

Download ZIP

datagramsession/event.go

33lines · modecode

1package datagramsession
2
3import (
4 "io"
5
6 "github.com/google/uuid"
7)
8
9// registerSessionEvent is an event to start tracking a new session
10type registerSessionEvent struct {
11 sessionID uuid.UUID
12 originProxy io.ReadWriteCloser
13 resultChan chan *Session
14}
15
16func newRegisterSessionEvent(sessionID uuid.UUID, originProxy io.ReadWriteCloser) *registerSessionEvent {
17 return &registerSessionEvent{
18 sessionID: sessionID,
19 originProxy: originProxy,
20 resultChan: make(chan *Session, 1),
21 }
22}
23
24// unregisterSessionEvent is an event to stop tracking and terminate the session.
25type unregisterSessionEvent struct {
26 sessionID uuid.UUID
27}
28
29// newDatagram is an event when transport receives new datagram
30type newDatagram struct {
31 sessionID uuid.UUID
32 payload []byte
33}
34