zinx icon indicating copy to clipboard operation
zinx copied to clipboard

A lightweight concurrent server framework based on Golang.

Results 109 zinx issues
Sort by recently updated
recently updated
newest added

请教个问题,如果不使用workpool每次req都重会开启一个goroutine,这样话连续几个req是无法保证顺序的,使用workpool就不会存在这样的问题,因为所有的req都会被路由到同一个routine当中,对吗?

这里采用了带缓存的channel向write协程发送数据,但是这是不是没有什么必要? 对于服务器来说发送的速度取决于服务器这边,就算采用了带缓存的channel实际上也只是增加了一点发送数据的延迟而已,因为write协程在不断从channel中获取数据并发送给客户端. 求刘老师指导 ; w ;

https://www.bilibili.com/video/BV1gf4y1r79E?p=29&spm_id_from=pageDriver 大佬,求《8小时转职Golang工程师》的markdown文档分享哈

如题,mmo的demo可以做一个mac版的客户端吗

我看了下好像只有自己约定router来实现登录鉴权。 身份识别只有在登录时设置property,然后每条消息读取property来判断。 请问有其他更好更合理的方式吗

make build make image make run 执行后没有错误,docker ps 也没有容器启动。 本机是 mac pro 11.6.2 docker Version 4.7.1 (77678) 请问有建议的排查的方向吗?

对zinx/examples/zinx_server中的main.go文件中的main函数小小地修改,如下 ``` // zinx/examples/zinx_server/main.go func main() { //创建一个server句柄 s := znet.NewServer() //注册链接hook回调函数 s.SetOnConnStart(DoConnectionBegin) s.SetOnConnStop(DoConnectionLost) //配置路由 s.AddRouter(0, &zrouter.PingRouter{}) s.AddRouter(1, &zrouter.HelloZinxRouter{}) //开启服务 s.Start() time.Sleep(time.Second * 10) s.Stop() time.Sleep(time.Second * 10) s.Serve() }...

在客户端链接服务端成功后,直接conn.Write([]byte("test")), 在服务端func (c *Connection) StartReader() {} 无法接收到网络包信息 如果是通过 dp := znet.NewDataPack() msg, err := dp.Pack(znet.NewMsgPackage(0, []byte("test"))) , err = conn.Write(msg) 在服务端端就能收到

``` goroutine 42866 [select]: github.com/aceld/zinx/znet.(*Connection).StartWriter(0xc0004d8e10) /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:68 +0x297 created by github.com/aceld/zinx/znet.(*Connection).Start /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:158 +0xa5 goroutine 42801 [IO wait]: internal/poll.runtime_pollWait(0x7fb04d6806e8, 0x72, 0xffffffffffffffff) /usr/local/go/src/runtime/netpoll.go:184 +0x55 internal/poll.(*pollDesc).wait(0xc000176018, 0x72, 0x0, 0x8, 0xffffffffffffffff) /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45 internal/poll.(*pollDesc).waitRead(...) /usr/local/go/src/internal/poll/fd_poll_runtime.go:92...