Code: Select all
on opencard
accept connections on port 7777 with message sClientConnected
end opencard
That all works fine, the socket sends data back and forth. In the closeCard handler of the card, I have
Code: Select all
on closecard
repeat for each line tSocket in the opensockets
--answer "Closing socket" && tSocket
close socket tSocket
end repeat
end closecard
Riddle me that, Batman!
Could it be that the close socket command is asynchronous, and only completes later after trying to fire a socketClosed message to a non-existant card? But since the card is already gone, it just hangs? Seems weird because the answer command is before the close socket command and should not really hold up the application after it is dismissed.