core

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Overview

copy from go-websocket-benchmark

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCommon

func HandleCommon(mux *http.ServeMux)

func Listen

func Listen(network, addr string, reuse bool) (net.Listener, error)

func Listen2

func Listen2(reuse bool) func(network, addr string) (net.Listener, error)

func StartServers

func StartServers(addrs []string, echo http.HandlerFunc, reuse bool) []net.Listener

Types

type BaseCmd

type BaseCmd struct {
	ReadBufferSize int `clop:"long" usage:"read buffer size" default:"1024"`
	// 使用限制端口范围, 默认1, -1表示不限制
	LimitPortRange int  `clop:"short;long" usage:"limit port range" default:"1"`
	Reuse          bool `clop:"short;long" usage:"reuse port"`
}

Jump to

Keyboard shortcuts

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