Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Lightweight Socket Service with heartbeat, Can be easily used in TCP server development.

License

NotificationsYou must be signed in to change notification settings

9b9387/zero

Repository files navigation

A Lightweight Socket Service with heartbeat, Can be easily used in TCP server development.

Build StatusGo Report CardGoDoc

Wiki Pagehttps://github.com/9b9387/zero/wiki

Requirements

Go version: 1.9.x or later

Usage

go get -u github.com/9b9387/zero
import"github.com/9b9387/zero"funcmain() {host:="127.0.0.1:18787"ss,err:=zero.NewSocketService(host)iferr!=nil {return}// set Heartbeatss.SetHeartBeat(5*time.Second,30*time.Second)// net eventss.RegMessageHandler(HandleMessage)ss.RegConnectHandler(HandleConnect)ss.RegDisconnectHandler(HandleDisconnect)ss.Serv()}

Example Code:https://github.com/9b9387/zero/blob/master/service_test.go

Demo

Unity Client Repositoryhttps://github.com/9b9387/zero_unity_demo

About

A Lightweight Socket Service with heartbeat, Can be easily used in TCP server development.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp