1 Star 0 Fork 0

ichub / go-factroy2024

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
GoService.go 469 Bytes
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2024-02-01 12:27 . add
package main
import (
"gitee.com/ichub/go-factroy2024/codefactroies/grpc/service"
"log"
"net"
"net/http"
"net/rpc"
)
//protoc --go_out=../code/grpc --proto_path=D:/dongxw/go-micro-leijm/code/grpc code.proto
func main() {
stringService := new(service.StringService)
rpc.Register(stringService)
rpc.Register(stringService)
rpc.HandleHTTP()
l, e := net.Listen("tcp", "127.0.0.1:1234")
if e != nil {
log.Fatal("listen error:", e)
}
http.Serve(l, nil)
}
Go
1
https://gitee.com/ichub/go-factroy2024.git
git@gitee.com:ichub/go-factroy2024.git
ichub
go-factroy2024
go-factroy2024
v1.2.0

搜索帮助