Git Product home page Git Product logo

kcp.net's People

Contributors

issingle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kcp.net's Issues

本机运行server跟client开100个,异步.客户端服务器都崩了

服务器
throw new ArgumentNullException("array");

KCP.dll!KCP.Common.DefaultArrayPool.Return(byte[] array, bool clearArray) 行 305 C#
KCP.dll!KCP.Server.KCPServer..ctor.AnonymousMethod__21_1(byte[] buf) 行 68 C#
KCP.dll!KCP.Common.KCPLib.Dispose() 行 1173 C#
KCP.dll!KCP.Server.KCPServer.ProcessDisposedQueue() 行 143 C#
KCP.dll!KCP.Server.KCPServer.Update() 行 122 C#
teste_kcp_server.exe!Program.Main(string[] args) 行 31 C#

客户端Assert
Debug.Assert(c.EndPoint.ToString() == e.RemoteEndPoint.ToString());
两者端口不同

发送2048长度的数据包会报错

我测试发送一个较大的数据包,比如2048会报错.
发现是send的时候size计算有误.
我自己修改之后,size正确了,
测试了其他长度,比如60000,1024000传输不正常
后续包无法正常收发,总是收到一个24字节的反馈.没有数据.剩下的我就不会修改了.

未处理System.ArgumentException
HResult=-2147024809
Message=源数组长度不足。请检查 srcIndex 和长度以及数组的下限。
ParamName=""
Source=mscorlib
StackTrace:
在 System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
在 System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
在 KCP.Common.KCPLib.Send(Byte[] buffer, Int32 index, Int32 bufsize) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\Common\kcp_v2.cs:行号 407
在 KCP.Common.KCPLib.Send(Byte[] buffer) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\Common\kcp_v2.cs:行号 418
在 KCP.Client.KCPClient.Send(Byte[] buf) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\KCPClient.cs:行号 160
在 test_kcp_client.ClientState.client_Event(UdpClientEvents arg1, Byte[] arg2) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\test_kcp_client\Program.cs:行号 105
在 KCP.Client.KCPClient.process_recv_queue() 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\KCPClient.cs:行号 200
在 KCP.Client.KCPClient.update(UInt32 current) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\KCPClient.cs:行号 238
在 KCP.Client.KCPClient.Update() 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\Kcp\KCPClient.cs:行号 173
在 test_kcp_client.ClientState.Start(String host, UInt16 port, UInt32 index, Int32 key) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\test_kcp_client\Program.cs:行号 84
在 test_kcp_client.Program.<>c__DisplayClass0_0.

b__2(Object _) 位置 C:\Users\DongHanjun\Source\Repos\kcp.net\test_kcp_client\Program.cs:行号 53
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart(Object obj)
InnerException:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.