增加websocket支持

This commit is contained in:
2025-09-08 13:47:13 +08:00
parent 9caedd697d
commit 7e0fd53dd3
336 changed files with 9020 additions and 20356 deletions

View File

@@ -17,12 +17,12 @@
package rt
const (
MinInt48 int64 = -(1 << 47)
MaxInt48 int64 = +(1 << 47) - 1
MinInt48 = -(1 << 47)
MaxInt48 = +(1 << 47) - 1
)
func PackInt(v int) uint64 {
if u := uint64(v); int64(v) < MinInt48 || int64(v) > MaxInt48 {
if u := uint64(v); v < MinInt48 || v > MaxInt48 {
panic("int48 out of range")
} else {
return ((u >> 63) << 47) | (u & 0x00007fffffffffff)