Difference between revisions of "Http server"

From Second Life Wiki
Jump to navigation Jump to search
Line 59: Line 59:
{{LSL DefineRow||[[llUnescapeURL]]}}
{{LSL DefineRow||[[llUnescapeURL]]}}
|also_footer
|also_footer
|notes=Zero Linden's Office Hours Discussion On Incoming HTTP: [https://wiki.secondlife.com/wiki/User:Zero_Linden/Office_Hours/Discussion#Incoming_HTTP]<br />PJIRA feature requests:<br />[http://jira.secondlife.com/browse/SVC-913 SVC-913]<br />[http://jira.secondlife.com/browse/SVC-1086 SVC-1086]Please go vote if this feature is important to you.
|notes=Zero Linden's Office Hours Discussion On Incoming HTTP: [https://wiki.secondlife.com/wiki/User:Zero_Linden/Office_Hours/Discussion#Incoming_HTTP]<br />PJIRA feature requests:<br />[http://jira.secondlife.com/browse/SVC-913 SVC-913]<br />[http://jira.secondlife.com/browse/SVC-1086 SVC-1086]<br />Please go vote if this feature is important to you.
|cat1
|cat1
}}
}}

Revision as of 11:18, 21 January 2008

Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.

Description

Event: http_server( integer event_type, string data ){ ; }

Triggered when an HTTP server changes states.

• integer event_type Constant denoting event type.
• string data Event data.
Event Type Description
HTTP_SERVER_ACTIVATED 1 HTTP Server has been opened.
HTTP_SERVER_DEACTIVATED 2 HTTP Server has been closed.

Caveats


Examples

integer Activate = 1;
default
{
    touch_start(integer t) // Touch Start/Stop HTTP Server
    {
        if (Activate)
        {
            llHTTPServer(); // Open An HTTP Server.
        }
        else
        {
            llHTTPServerRemove(); // Closes Current HTTP Server.
        }
        Activate != Activate;
    }
    http_server(integer event_type, string data)
    {
        if (event_type == HTTP_SERVER_ACTIVATED)
        {
            //Data Is The HTTP Servers URL.
            llOwnerSay("HTTP Server Activated At: " + data);
        }
        else if (event_type == HTTP_SERVER_DEACTIVATED)
        {
            //Data Is Empty String.
            llOwnerSay("HTTP Server Has Been Deactivated!");
        }
    }
}

Notes

Zero Linden's Office Hours Discussion On Incoming HTTP: [1]
PJIRA feature requests:
SVC-913
SVC-1086
Please go vote if this feature is important to you.

See Also

Events

•  http_request

Functions

•  llHTTPServer For opening an llHTTPServer.
•  llHTTPServerRemove For removing the current HTTP server from a script.
•  llGetHTTPServerURL For retrieving the current HTTP server URL.
•  llHTTPResponse For replying to HTTP requests.
•  llEscapeURL
•  llUnescapeURL

Deep Notes

Signature