How to STOP accepting connections?

Gordon Tillman got at mindspring.com
Mon Oct 11 13:31:17 EDT 2004


Greetings All,

Sorry if this has been asked before...I couldn't find anything in the 
archives.

Given a RR app that is accepting socket connections as follows:

accept connections on port 1234 with message "ConnectionRequest"

If at some time in the future the application wants to stop accepting 
connections, how might that be accomplished?

I know that in the AcceptCallback message we could do something like 
this:

on ConnectionRequest pSocketID
	if gAcceptingConnections then
		-- do whatever
    	else
		close socket pSocketID
        	end if
end ConnectionRequest


But I was wondering if there was just a way to no longer have the 
application listen for connections, because you only have to issue the 
accept connections one time in your app and it is then listening for 
connection until you quit.

Thanks!

--gordon



More information about the use-livecode mailing list