Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果监听端口被占用,依然会返回成功的问题 #149

Open
im-starrain opened this issue Nov 10, 2024 · 1 comment
Open

如果监听端口被占用,依然会返回成功的问题 #149

im-starrain opened this issue Nov 10, 2024 · 1 comment

Comments

@im-starrain
Copy link

GateSocket.Start(
procedure(const AListen: ICrossListen; const ASuccess: Boolean)
begin
if not ASuccess then begin
Application.MessageBox('监听端口被占用,请更换监听端口后重新启动!!!', '提示信息',
MB_OK + MB_ICONERROR);
Exit;
end;
end
);

@im-starrain
Copy link
Author

找到问题了。TSocketAPI.SetReUseAddr(LListenSocket, True); 修改为 TSocketAPI.SetReUseAddr(LListenSocket, False); 就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant