1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-28 10:15:23 +00:00

session frame support

This commit is contained in:
Darien Raymond 2017-01-30 22:02:28 +01:00
parent 509700eddb
commit bd69763c63
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -3,6 +3,7 @@ package protocol
import (
"runtime"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
"v2ray.com/core/common/uuid"
)
@ -116,3 +117,26 @@ func (v *SecurityConfig) AsSecurity() Security {
}
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
}