道一

Results 24 comments of 道一

Sorry, my stupid student using32-bit compiler with 64-bit OS leads to the problem. I asked him for times if his env is right and he's sure. Int is 32 bit...

> 是否要以使用时间轮的方式来实现,减少Ticker数量对CPU的压力? 时间堆更好

I guess what he means is: the client establishes a connection to the remote service through a proxy server. If gnet implements net.Conn, it's easy to support proxies.

It's still TCP at the bottom, so there's no real point.

> It's useful for the same reason it's useful for normal HTTP requests, built in pipelining. Means you can use a single TCP connection with multiple websockets instead of having...

@evrins Brother, would you be interested in giving varbhat/exatorrent a pr? The ui is mediocre but the download speed is pretty fast.

可以参考WebSocket协议, 分片传输大包

In fact, []byte or io.Reader is essential, and the serialization method depends on the application developer.

The solution to this problem is also simple. 1. Do not reuse the bufio.ReadWriter returned by hijack. 2. Start a new goroutine when reading messages in a loop.