380 Star 2.5K Fork 615

GVPJohn / gf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gudp_server.go 325 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"gitee.com/johng/gf/g/net/gudp"
"fmt"
)
func main() {
gudp.NewServer("127.0.0.1:8999", func(conn *gudp.Conn) {
defer conn.Close()
for {
if data, _ := conn.Recv(-1); len(data) > 0 {
fmt.Println(string(data))
}
}
}).Run()
}
Go
1
https://gitee.com/johng/gf.git
git@gitee.com:johng/gf.git
johng
gf
gf
v1.4.7

搜索帮助