Does OnIncommingConnection gets called before OnPlayerConnect ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Does OnIncommingConnection gets called before OnPlayerConnect ? (
/showthread.php?tid=622425)
Does OnIncommingConnection gets called before OnPlayerConnect ? -
NeXoR - 22.11.2016
And also, GetPlayerIpPort() function, port is always the server's port ?
Re: Does OnIncommingConnection gets called before OnPlayerConnect ? -
Vince - 22.11.2016
Obviously. And no, that would be the client port. This is pretty useless to know since the port is chosen ad random from a pool of available ports in the range 49152 – 65535. See:
https://en.wikipedia.org/wiki/Ephemeral_port
Re: Does OnIncommingConnection gets called before OnPlayerConnect ? -
NeXoR - 22.11.2016
Quote:
Originally Posted by Vince
Obviously. And no, that would be the client port. This is pretty useless to know since the port is chosen ad random from a pool of available ports in the range 49152 – 65535. See: https://en.wikipedia.org/wiki/Ephemeral_port
|
Let's say someone is stressing my server (DDoS) ON PORT 7777 (or whatever the server port is), would it basically call this function all through the attack ?
Re: Does OnIncommingConnection gets called before OnPlayerConnect ? -
Abagail - 22.11.2016
Quote:
Originally Posted by NeXoR
Let's say someone is stressing my server (DDoS) ON PORT 7777 (or whatever the server port is), would it basically call this function all through the attack ?
|
During a generic DDoS attack where the attacker isn't exploiting something within the server, OnIncomingConnection won't be called. It is only called when someone sends an incoming connection to the SA-MP server, not the IP address/network.
Re: Does OnIncommingConnection gets called before OnPlayerConnect ? -
NeXoR - 22.11.2016
Quote:
Originally Posted by Abagail
During a generic DDoS attack where the attacker isn't exploiting something within the server, OnIncomingConnection won't be called. It is only called when someone sends an incoming connection to the SA-MP server, not the IP address/network.
|
Exactly, that's why I marked the server port
AKA if you send a DDoS attack on the SAMP servers port
Re: Does OnIncommingConnection gets called before OnPlayerConnect ? -
Abagail - 22.11.2016
Quote:
Originally Posted by NeXoR
Exactly, that's why I marked the server port
AKA if you send a DDoS attack on the SAMP servers port
|
DDosing the server through the SAMP port won't send an incoming connection.