Kill socket after x seconds

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Kill socket after x seconds

Post by ace16vitamine » Fri Feb 07, 2020 7:22 pm

Dear all,

we are communicating with clients over socket via

Code: Select all

accept connections on port 9999 with message blablabla

and

Code: Select all

read from socket xzy until
Now, if a client fails, or an attacker makes 10000000 sessions :cry: or whatever the socket is multiple times open... Is there a possibility to kill the idle sockets after 5 seconds? Or can I set a Timeout?

Thanks
Stef

Klaus
Posts: 14192
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Kill socket after x seconds

Post by Klaus » Fri Feb 07, 2020 7:32 pm

Hi Stef,

well, that should be -> the sockettimeoutinterval :-)


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Kill socket after x seconds

Post by FourthWorld » Fri Feb 07, 2020 7:47 pm

Which OS is running on the server? If Linux I'd set up UFW to handle those DDOS concerns.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ace16vitamine
Posts: 130
Joined: Fri Apr 13, 2018 1:53 pm

Re: Kill socket after x seconds

Post by ace16vitamine » Fri Feb 07, 2020 9:00 pm

Hey Klaus,
well, that should be -> the sockettimeoutinterval
cool, thanks!

@FourthWorld
If Linux I'd set up UFW to handle those DDOS concerns
Yes, I have iptables in front of the DMZ, but it can not hurt to develop the application with this feature too.

Post Reply