MCPcopy Index your code
hub / github.com/9b9387/zero

github.com/9b9387/zero @v1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0 ↗ · + Follow
45 symbols 114 edges 8 files 35 documented · 78% updated 6y ago★ 176
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

zero

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

Build Status

Wiki Page https://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"

func main() {
    host := "127.0.0.1:18787"

    ss, err := zero.NewSocketService(host)
    if err != nil {
        return
    }

    // set Heartbeat
    ss.SetHeartBeat(5*time.Second, 30*time.Second)

    // net event
    ss.RegMessageHandler(HandleMessage)
    ss.RegConnectHandler(HandleConnect)
    ss.RegDisconnectHandler(HandleDisconnect)

    ss.Serv()
}


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

Core symbols most depended-on inside this repo

Shape

Method 29
Function 12
Struct 4

Languages

Go100%

Modules by API surface

service.go14 symbols
session.go9 symbols
message.go7 symbols
conn.go7 symbols
service_test.go5 symbols
codec.go2 symbols
codec_test.go1 symbols

For agents

$ claude mcp add zero \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page