mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-17 09:56:18 -05:00
session frame support
This commit is contained in:
parent
509700eddb
commit
bd69763c63
@ -3,6 +3,7 @@ package protocol
|
|||||||
import (
|
import (
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
|
"v2ray.com/core/common/buf"
|
||||||
"v2ray.com/core/common/net"
|
"v2ray.com/core/common/net"
|
||||||
"v2ray.com/core/common/uuid"
|
"v2ray.com/core/common/uuid"
|
||||||
)
|
)
|
||||||
@ -116,3 +117,26 @@ func (v *SecurityConfig) AsSecurity() Security {
|
|||||||
}
|
}
|
||||||
return NormSecurity(Security(v.Type))
|
return NormSecurity(Security(v.Type))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SessionFrameOption byte
|
||||||
|
|
||||||
|
const (
|
||||||
|
SessionFrameOptionDefault SessionFrameOption = 0x00
|
||||||
|
SessionFrameOptionNew SessionFrameOption = 0x01
|
||||||
|
SessionFrameOptionContinue SessionFrameOption = 0x02
|
||||||
|
SessionFrameOptionEnd SessionFrameOption = 0x03
|
||||||
|
)
|
||||||
|
|
||||||
|
type SessionId uint32
|
||||||
|
|
||||||
|
const (
|
||||||
|
DefaultSessionId SessionId = 0
|
||||||
|
)
|
||||||
|
|
||||||
|
type SessionFrame struct {
|
||||||
|
Id SessionId
|
||||||
|
Option SessionFrameOption
|
||||||
|
Address net.Address
|
||||||
|
Port net.Port
|
||||||
|
Payload *buf.Buffer
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user