Comments (5)
1.主线程连接服务器之后的代码不再执行了:连接在线程中执行,不会阻塞主线程顺序执行的代码,如果后续的代码没有执行检查是否有异常抛出.如果是之后的连接事件不执行,连接成功后会执行成功事件,失败事件只有主动断开连接或者通信主机异常时抛出,建议心跳检测可以配合isconnect(上次是否连接正常)配合使用,具体参考TCP协议说明.
2.tcp.Socket.Nodelay报错可以抓取异常查看异常日志,如果是nullexception应该是Socket没有创建成功,如果是其他的异常建议参考异常信息,比如是否允许设置nodelay等
from hisocket.
1.主线程连接服务器的话,连接是正常的 通信也正常没问题。 会报以下这个异常
2.子线程也是报这个异常
3.捕获这个异常就能执行到 Connect()方法后了。
4.可以请教一下这个异常什么意思吗?搜索了一下 还是不明白....
System.Net.Sockets.SocketException (0x80004005): 提供了一个无效的参数。
在 System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent)
在 System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
在 System.Net.Sockets.Socket.set_NoDelay(Boolean value)
from hisocket.
检查一下自己项目中socket的设置项,比如是否设置nodelay,是否设置timeout超时等具体参数
from hisocket.
我试了就是只在tcp.Socket.NoDelay = true;
这一句会有异常。可是这个参数感觉没什么问题啊 true 和 false。是否可能您框架内已经设置过了,所以我在设置会有问题?其他地方没有关于socket的设置。这些都是在example里copy的
from hisocket.
框架里面没有设置socket的参数(比如Nodelay等),这些需要根据自己的项目设置.
example只是示例展示给用户,Socket对象可以获取的,用户按照自己项目的独有性设置这些参数.
from hisocket.
Related Issues (20)
- i can not recieve disconnected state .is it my problem ? HOT 3
- IndexOutOfRangeException: Index was outside the bounds of the array. HOT 4
- while closing the scene it gives an error on socket.close method HOT 1
- OnDisconnected event has problem HOT 1
- 这个socket客户端解决方案,是否支持udp? HOT 4
- 使用 TcpConnection.Connect()没有反应结果,如何捕获连接的异常? HOT 10
- 使用TcpConnection一次性接收16000bit的数据时候报异常 HOT 6
- 请问支持tcp长连接吗? HOT 1
- can i use it with Unity 3d but without extends monobehaviour? like normal c# without Start and Update fucntions HOT 1
- 看起来不错,不知后期是否有融合KCP的打算 HOT 1
- 如果解析失败,数据就被丢弃了。 HOT 1
- When It can not connect to a server, it will throw an exception without catch , this will shut down the appliction. HOT 1
- Problema with expections being thrown HOT 3
- 新版本是否有意愿开发Server端的? HOT 1
- 事件不应在异步方法的回调中触发,因为事件的委托基本上要调用UnityEngine的API,而异步方法的回调不是在Unity主线程中执行的。 HOT 1
- 优化接口
- Support reconnect feature in example HOT 3
- 编辑器卡死 HOT 5
- StringHexToBytes has problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hisocket.