RTMP/E
startVHost(vhost:String) : Object
HTTP
http://www.example.com:1111/admin/startVHost?auser=username&apswd=password&vhost=name
Starts a stopped virtual host or enables a new virtual host.
This method lets you enable a new virtual host at run time without restarting the server. The new virtual host directory and configuration files must already be present in the server’s conf directory; the startVHost() method does not create or copy any directories or configuration files. For information on adding virtual hosts, see Adobe Media Server Configuration and Administration Guide.
You must be a server administrator to use the startVHost() method.
Availability
Flash Communication Server 1.0.
Parameters
vhost
A String indicating the name of the virtual host you want to start or the new virtual host you want to enable, in the form [adaptor/]vhost.
If you are enabling a new virtual host on the adaptor to which you’re connected, omit adaptor/.
auser
A String indicating the user name of the administrator.
apswd
A String indicating the password of the administrator.
Returns
RTMP/E
If the call succeeds, the server sends a reply information object with a level property of status and a code property of NetConnection.Call.Success.
If the call fails, the server sends a reply information object with a level property of error and a code property of NetConnection.Admin.Command.Failed or a more specific value, if available. Some objects might also have a description property that contains a string describing the cause of the failure.
HTTP
If the call succeeds, it returns XML with the following structure:
<result> <level></level> <code></code> <timestamp></timestamp> </result>If the call fails, it returns XML with the following structure:
<result> <level></level> <code></code> <description></description> <timestamp></timestamp> </result>The XML elements contain the same information as the Object properties returned in an RTMP/E call.
Note: The timestamp response over HTTP is formatted differently on Windows (9/23/2007 6:16:40 PM) and Linux (Sun 23 Sep 2007 06:16:40 PM IST).
Example
The following example starts a virtual host named diamond.world.com on the currently connected adaptor and then starts a virtual host named diamond.world.com on the gem adaptor.
nc_admin = new NetConnection(); nc_admin.connect("rtmp://localhost:1111/admin", "JLee", "x52z49ab"); /* Starts a virtual host named diamond.world.com */ nc_admin.call("startVHost", new onStartVHost(), "diamond.world.com"); /* Starts a virtual host named diamond.world.com on the adaptor, gem */ nc_admin.call("startVHost", new onStartVHost(), "gem/diamond.world.com");
See also