server

package
v0.0.0-...-c93e207 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CLIENT_HEADER_SIZE = 8
View Source
const RECV_BUF_SIZE_DEF = 4096 * 100

Variables

View Source
var Setting = &ServerSetting{
	RecvBufSize: RECV_BUF_SIZE_DEF,
}
View Source
var Version = "v0.0.0"

Functions

func InitServerConfig

func InitServerConfig()

func ParseHeader

func ParseHeader(buffer []byte) (packetLen, packetType uint32)

Types

type ServerInfo

type ServerInfo struct {
	AppId     string `json:"appid"`
	AppName   string `json:"appname"`
	StartTime string `json:"time"`
	Version   string `json:"version"`
}

type ServerSetting

type ServerSetting struct {
	RecvBufSize int // default is 4k
}

type ServerUniqueId

type ServerUniqueId struct {
	UID int64 `json:"uid"`
}

type SpanServer

type SpanServer struct {
	// contains filtered or unexported fields
}

func (*SpanServer) Run

func (server *SpanServer) Run() (code int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL