Close opensockets after 30 sec

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: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

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

Close opensockets after 30 sec

Post by ace16vitamine » Tue May 12, 2020 10:08 pm

Dear all,

is there any way to close open sockets after 30 sec? socket timeout does not work because I want to kill the opensocket
whatever datas will be transfered.

Regards
Stef

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 745
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: Close opensockets after 30 sec

Post by Thierry » Wed May 13, 2020 7:00 am

ace16vitamine wrote:
Tue May 12, 2020 10:08 pm
is there any way to close open sockets after 30 sec? socket timeout does not work because
I want to kill the opensocket whatever datas will be transfered.
Hi Stef,

socket timeout won't do what you're looking at.
I believe you want this one: close socket socketID

And to do it after 30 seconds (pseudo-code):

Code: Select all

open socket ...
send "closeThisSocket" to me in 30 seconds

-----------------------
on closeThisSocket
     close socket socketID
end closeThisSocket

HTH,

Thierry
Regex LiveCode sunnYrex
https://sunny-tdz.com

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

Re: Close opensockets after 30 sec

Post by ace16vitamine » Wed May 13, 2020 8:38 pm

Hi,

this does only work from the one who is open the socket.

But I need to do this from the "Server":
accept secure connections on port 9999 with message "verbindung_client_read"

Thanks
Stef

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”