Zarf Vantongerloo
Obscure Resident
Join date: 22 Jun 2005
Posts: 110
|
08-04-2005 12:49
The LSL wiki page for llCloseRemoteDataChannel says that once a channel has been opened by a script the only thing that will cause the channel to close is the recompilation of the script. Is this true?
I have discovered that creating the data channel takes a long time, so I'd like to create one data channel when my object initializes and just use it for all my transactions (which may be over many days.) Will the channel stay active that long?
I need to know which actions will cause the channel to become invalid closed so I can open a new one. Is the channel preserved when taken into inventory and reconstituted on rez? Is the channel preserved on script reset? (I assume not for both.) Is there any sort of inactivity timeout on XML RPC channels?
|
Satchmo Prototype
eSheep
Join date: 26 Aug 2004
Posts: 1,323
|
08-04-2005 13:17
I don't know the answers to all these questions, because I have yet to keep a channel open this long. However, everytime the object gets a new key it will have to recreate the channel. When you put an object into inventory and pull it back out into the world it's key will change.
Keys shouldn't change if an object remains in the world over the course of a few days, but be prepared for a SIM crash, grid update or other occurence that will cause your scripts to reset.
|
Zarf Vantongerloo
Obscure Resident
Join date: 22 Jun 2005
Posts: 110
|
08-04-2005 14:54
Wait - does a sim crash cause objects to reset? They don't checkpoint and restore the object state? Just like: Shizzaam, all variables reset, enter the default state, no state_exit from the previous one, etc...? Dang!
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
08-04-2005 15:47
From: Zarf Vantongerloo Wait - does a sim crash cause objects to reset? They don't checkpoint and restore the object state? Just like: Shizzaam, all variables reset, enter the default state, no state_exit from the previous one, etc...? Dang! Not usually, but it's a sim crash -- bad things are going to happen.
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
08-04-2005 16:44
XMLRPC channels die if the sim goes down for more than 20 minutes.
|
Hatta Muir
Registered User
Join date: 25 Jun 2005
Posts: 11
|
08-08-2005 06:45
My understanding from reading the documentation (and from minor experimentation) is that the channel is created based on the channelID from the script. So each time you recompile or re-rez the script, you get a different channelID.
In theory, as long as the ChannelID doesn't change, you should be able to maintain the XML-RPC channel for as long as the object is rezzed, and the script is not reset.
From a technical perspective, I read the process as being based on the script ID (channel ID) that is created by the script. When the XML-RPC call is made, the key is the script ID, which is how SL knows where to redirect the incoming data.
Interestingly in my own implementation I specifically use llResetScript() to ensure that the channelID is different - otherwise I can send as many replies as I like through the currently open channel.
That probably doesn't make it any clearer, but I've tested sending inbound XML-RPC over a period of 20 or so minutes through the same XML-RPC chqnnel (same channel key) to the same object. I haven't tested longer periods though (not being a land owner, I can't rez an object and leave it sitting there for several days to check)
|