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

建议增加SO_REUSEPORT,SO_REUSEADDR在linux下多开进程是无效的 #100

Closed
pony5551 opened this issue Apr 9, 2021 · 1 comment
Closed

Comments

@pony5551
Copy link

pony5551 commented Apr 9, 2021

class function TSocketAPI.SetReUsePort(const ASocket: THandle;
const AReReUsePort: Boolean): Integer;
const
SO_REUSEPORT = 15;
var
LOptVal: Integer;
begin
if AReReUsePort then
LOptVal := 1
else
LOptVal := 0;
Result := TSocketAPI.SetSockOpt(ASocket, SOL_SOCKET, SO_REUSEPORT, LOptVal, SizeOf(Integer));
end;

@winddriver
Copy link
Owner

抱歉,现在才改,已经更新了

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

2 participants