Coder Social home page Coder Social logo

sharplink's People

Contributors

randoms avatar weijiz avatar wizardofthewest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sharplink's Issues

客户端参数检查

当输入一个无效的ID的时候客户端会崩溃,应该做参数的有效性检查

增加网络变化重连功能

有的电脑刚开机时没有联网,后来进行了设置才有网络连接.这时候程序应该自动重新连接网络.

客户端报错

System.AggregateException: One or more errors occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SharpTox.Core.Tox'.
   at SharpTox.Core.Tox.ThrowIfDisposed() in E:\workspace\SharpLink\SharpTox\SharpTox\Core\Tox.cs:line 2151
   at SharpTox.Core.Tox.get_IsConnected() in E:\workspace\SharpLink\SharpTox\SharpTox\Core\Tox.cs:line 55
   at Skynet.Base.Skynet.sendMsg(ToxId toxid, Byte[] msg) in E:\workspace\SharpLink\Skynet\Base\Skynet.cs:line 316
   at Skynet.Base.Skynet.sendRequest(ToxId toxid, ToxRequest req, Boolean& status) in E:\workspace\SharpLink\Skynet\Base\Skynet.cs:line 443
   at SharpLink.LinkClient.<HandShake>d__11.MoveNext() in E:\workspace\SharpLink\SharpLink\LinkClient.cs:line 40
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at SharpLink.LinkClient.Connect(Skynet mSkynet, String targetToxId, IPAddress ip, Int32 port, Action`1 msgHandler, Action closeHandler, Action`1 errorHander) in E:\workspace\SharpLink\SharpLink\LinkClient.cs:line 98
   at SharpLink.Program.<>c__DisplayClass0_1.<Main>b__1() in E:\workspace\SharpLink\SharpLink\Program.cs:line 136
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SharpTox.Core.Tox'.
   at SharpTox.Core.Tox.ThrowIfDisposed() in E:\workspace\SharpLink\SharpTox\SharpTox\Core\Tox.cs:line 2151
   at SharpTox.Core.Tox.get_IsConnected() in E:\workspace\SharpLink\SharpTox\SharpTox\Core\Tox.cs:line 55
   at Skynet.Base.Skynet.sendMsg(ToxId toxid, Byte[] msg) in E:\workspace\SharpLink\Skynet\Base\Skynet.cs:line 316
   at Skynet.Base.Skynet.sendRequest(ToxId toxid, ToxRequest req, Boolean& status) in E:\workspace\SharpLink\Skynet\Base\Skynet.cs:line 443
   at SharpLink.LinkClient.<HandShake>d__11.MoveNext() in E:\workspace\SharpLink\SharpLink\LinkClient.cs:line 40
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at SharpLink.LinkClient.Connect(Skynet mSkynet, String targetToxId, IPAddress ip, Int32 port, Action`1 msgHandler, Action closeHandler, Action`1 errorHander) in E:\workspace\SharpLink\SharpLink\LinkClient.cs:line 98
   at SharpLink.Program.<>c__DisplayClass0_1.<Main>b__1() in E:\workspace\SharpLink\SharpLink\Program.cs:line 136
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()<---

还需要处理的问题

  1. 服务器端有稍微的内存泄露
  2. 当下载大文件的时候,会出现下载到一半卡住的情况
  3. 下载文件时CPU使用率比较高
  4. 带宽使用率不高,目前只能达到原带宽的50%左右.

exception in server log

Time: 1466048231610, Event: tox is offline
Time: 1466048232610, Event: tox is offline
Time: 1466048233610, Event: tox is offline
Time: 1466048234610, Event: tox is offline
Time: 1466048235610, Event: tox is offline
Time: 1466048236610, Event: tox is offline
Time: 1466048237626, System.AggregateException: 发生一个或多个错误。 ---> Newtonsoft.Json.JsonReaderException: Read past end of current container context. Path ''.
   在 Newtonsoft.Json.Bson.BsonReader.ReadNormal()
   在 Newtonsoft.Json.Bson.BsonReader.Read()
   在 Newtonsoft.Json.JsonReader.ReadAndAssert()
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   在 Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   在 Skynet.Models.ToxRequest.fromBytes(Byte[] data) 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Models\ToxRequest.cs:行号 62
   在 Skynet.Base.Skynet.newReqReceived(Package receivedPackage) 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Base\Skynet.cs:行号 245
   在 Skynet.Base.Skynet.<.ctor>b__13_0() 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Base\Skynet.cs:行号 95
   在 System.Threading.Tasks.Task.InnerInvoke()
   在 System.Threading.Tasks.Task.Execute()
   --- 内部异常堆栈跟踪的结尾 ---
---> (内部异常 #0) Newtonsoft.Json.JsonReaderException: Read past end of current container context. Path ''.
   在 Newtonsoft.Json.Bson.BsonReader.ReadNormal()
   在 Newtonsoft.Json.Bson.BsonReader.Read()
   在 Newtonsoft.Json.JsonReader.ReadAndAssert()
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   在 Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   在 Skynet.Models.ToxRequest.fromBytes(Byte[] data) 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Models\ToxRequest.cs:行号 62
   在 Skynet.Base.Skynet.newReqReceived(Package receivedPackage) 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Base\Skynet.cs:行号 245
   在 Skynet.Base.Skynet.<.ctor>b__13_0() 位置 C:\Users\randoms\Documents\Visual Studio 2015\Projects\SharpLink\Skynet\Base\Skynet.cs:行号 95
   在 System.Threading.Tasks.Task.InnerInvoke()
   在 System.Threading.Tasks.Task.Execute()<---

连接速度比较慢

有时候连接的速度会比较慢,还有可能连接失败.但是整体程序运行是正常的.

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.