kcp-go
kcp-go copied to clipboard
A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC
这个函数是连接的意思吧,里面怎么也是调用的 net.ListenUDP 方法?
```golang // SetWriteBuffer sets the socket write buffer, no effect if it's accepted from Listener func (s *UDPSession) SetWriteBuffer(bytes int) error { s.mu.Lock() defer s.mu.Unlock() if s.l == nil {...
listener.Accept() runs only after a byte is received: but expected to run it after kcp.Dial. The test code: ``` package main import ( "log" "time" kcp "github.com/xtaci/kcp-go/v5" ) func main()...
代码中没有使用conv当唯一标识,而是使用ip和port作为唯一标识。当客户端切换网络或者挂上VPN时,IP会改变,这样就认为是一个新连接了,后续发送的包无法和客户端对应上。这个问题需要如何处理呢?
看到kcp中`const IUINT32 IKCP_WND_RCV = 128; `,而kcp-go中改成了32,`const IRUDP_WND_RCV = 32`,请问有什么考量吗?
如题。 能否告知为何最大 MTU 限制为1500
//reedsolomon里面支持柯西矩阵了,加个参数应该就可以 codec, err := reedsolomon.New(dataShards, parityShards, reedsolomon.WithCauchyMatrix()) if err != nil { return nil } //看minio里面,还用了WithAutoGoroutines,不知道能有多大效果 e.encoder, err = reedsolomon.New(dataBlocks, parityBlocks, reedsolomon.WithAutoGoroutines(int(e.ShardSize()))) if err != nil { logger.LogIf(ctx, err) return...
when send a big packet by Kcp.Send, packet will be divided with frg flag. but in UDPSession.WriteBuffers function, packet is divided before call Kcp.Send. in this case, receiver can not...
代码里mtu是1500的情况下,加上udp的包头,会超过网络层的mtu,导致ip层的分包。ip层分包传输是不可靠的,会降低kcp的可靠性