gcnet

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

[toc]

测试

使用netcat发送测试数据

$ echo -n -e "Hello Go-Netty\nhttps://go-netty.com\n" | nc 127.0.0.1 3333

protobuf

安装相关包

go get -u github.com/golang/protobuf/proto
go get -u google.golang.org/protobuf
go get -u google.golang.org/grpc

转换命令

protoc --go_out=plugins=grpc:./gcnet/proto.pb gcnet/proto/*.proto

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocatePorts added in v1.0.1

func AllocatePorts(count int) ([]string, error)

AllocatePorts allocates random ports suitable for listening.

func GetFreePort added in v1.0.1

func GetFreePort() (port int, err error)

func GetUnUsedPort added in v1.0.1

func GetUnUsedPort(host string, num, min, max int) []int

func ScanPort

func ScanPort(protocol string, hostname string, port int, timeout time.Duration) bool

ScanPort 测试端口占用情况

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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