Giter Club home page Giter Club logo

Comments (12)

yangsungyeol avatar yangsungyeol commented on June 13, 2024

I tried many times, but ,
I have not had any problems with firewall programs.

When the PC is turned on , run visual studio and check the results , Sdk.Server.HP_Server_Start(SenderPtr, Address, Port) returns True regardless of the firewall.

The problem is that when it returns False, I don't know the reason for the error.

If it returns False, restarting HP_Server_Start, retrying, quitting Visual Studio, or restarting the program will not resolve the issue.

rebooting the PC sometimes works.

When the server fails to start, is there an error message or any way to know why?

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

errorCode : SocketBind
erroeMessage : "Bind SOCKET Fail"

Message received.
2023-10-31_13h00_45

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

When the socket server failed to start, I disabled all unused network adapters on my PC network connection.

Then the server started successfully.

I think this might be a hint to solve the problem.

当套接字服务器无法启动时,我禁用了电脑网络连接上所有未使用的网络适配器。

然后服务器就成功启动了。

我想这可能是解决问题的一个提示。
2023-10-31_13h23_35
2023-10-31_13h28_26

from hp-socket.

ldcsaa avatar ldcsaa commented on June 13, 2024

When start fail, uses Server.GetLasterror() and SDK.SYS_GetLastError() to obtain component error code and system errorcode.

System errorcode would explain why "Bind SOCKET Fail", maybe Port in used, address not exists etc.

from hp-socket.

int2e avatar int2e commented on June 13, 2024

绑定为 0.0.0.0 会有这个问题吗?

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

from hp-socket.

ldcsaa avatar ldcsaa commented on June 13, 2024

看看是配置的IP,网段是否有重叠。

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

绑定为 0.0.0.0 会有这个问题吗?

无论我从哪个目镜开始,情况都是一样的。

0.0.0.0 , 192.168.0.87 , 127.0.0.1

交换端口时也是如此。

重启和重启电脑时也是一样、
我的电脑上有几个未使用的网络适配器,我把它们都禁用了,问题就解决了。

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

看看是配置的IP,网段是否有重叠。

我的开发机使用 DHCP,所以这不是系统配置问题。

在某些情况下,绑定不起作用,禁用未使用的网络适配器后问题就解决了。

将来,我希望能指定某个适配器开始监听套接字。

from hp-socket.

yangsungyeol avatar yangsungyeol commented on June 13, 2024

目前,我通过禁用不必要的网络适配器解决了这个问题。

如果有任何改进,请告诉我。

from hp-socket.

ldcsaa avatar ldcsaa commented on June 13, 2024

试试重置一下协议栈:
netsh int ip reset
netsh winsock reset
重启机器。

from hp-socket.

Related Issues (20)

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.