cs8425

Results 30 comments of cs8425

Hi, you can try websocket server written in golang as I did: https://github.com/cs8425/jsmpeg/tree/master/go-wsrelay

> I don't believe the first change can improve the performance. > > `bytes.NewReader` doesn't allocate any memory on heap. Using `sync.Pool` in this case only cause the variables escape...

> And I don't like to switch the `zlib` implementation, unless you can prove it's necessary and the third-party library is reliable. > > (I means may be it has...

> I don't believe the first change can improve the performance. > > `bytes.NewReader` doesn't allocate any memory on heap. Using `sync.Pool` in this case only cause the variables escape...

Maybe I should split into 2 PR.... should I squash the commits before merge?

Stack trace looks like #5998, which cause by removing entities in event handler. not sure only `EntityRemoveFromWorldEvent` or there are more? Maybe can give a try.

Maybe you can take a look of my branch : https://github.com/cs8425/smux/tree/implement-half-close I implement half-close feature but not fully tested if there were data racing.

@dotqi Read Stream回傳broken pipe的原因有很多 有正常的被close也有因為缺陷造成的不正常close 麻煩給更詳細資料 最好是簡單的demo code可以複現問題 至於我改了什麼功能請到PR https://github.com/xtaci/smux/pull/47#issuecomment-471889073

....test裡面的`setupServer()`怎老是failed= = `pushBytes()`那邊改了 不確定會不會跟`streamClosed()`沖到 不過`OpenStream()`應該會有提升

> ``` > _, err := s.sess.writeFrameInternal(newFrame(cmdFIN, s.id), time.After(s.sess.config.KeepAliveTimeout)) > s.sess.streamClosed(s.id) > ``` > 这两行为何要调换过来,不懂。但是调换过来,则就能测试通过了。能说明下原因么? > > 我现在测试都通过了,--race 也能通过。但是这两行一换过来就不通过。不好理解。 只是剛好執行時間點的問題(`writeFrame`的部份) 並不是真正的問題原因.. 你試試看加上這個: https://github.com/cs8425/smux/blob/move-token-to-stream2/stream.go#L98-L100 還有把`s.empflag`改回用Mutex 用script放下去連續跑test到現在還沒失敗過 對了 有需要實作HalfClose的功能嗎? 提供這兩個: `func (c...