[sldev] Re: Plugin API Architecture for Second Life
Argent Stonecutter
secret.argent at gmail.com
Tue Feb 13 06:05:59 PST 2007
My choice for a first cut at a plugin architecture for SL would be a
socket-based one for interfacing LSL scripts and scripts local to the
PC. That would be easiest to implement, and external scripts could be
written that would run on any platform: Windows, Linux, or Mac.
There's two possible ways to initiate the connection. You could have
a preference pane in SL to configure it, with a list of LSL chat
channels and the ports they're assigned to, and whether they're one-
way (control only) or two-way (control and feedback). Or you could
have a single port that SL listens to and accepts requests for
channels from local scripts - the local script would open the port
and send a line of text such as "chat=42 listen=0".
The port would be opened on localhost only, so it couldn't be used as
part of a remote exploit.
The external script would open the port. Any line of text it sent
would be chatted on that channel by the client. LSL scripts in the
sim would interpret that and react appropriately. This would allow
you to control LSL scripts that weren't specifically designed for
remote control, like existing vehicles.
For feedback, all scripts could receive:
* Messages sent on channel 0, if the user chooses to allow it - this
would be necessary for some vehicle controls.
* llInstantMessage messages.
* Messages sent on the requested channel, if the client has the
ability to request responses from channels other than 0. Otherwise, a
HUD forwarder that could convert messages on channels into
llInstantMessages could be used.
More information about the SLDev
mailing list