IWMSCommandValues Object (Visual Basic .NET)
The IWMSCommandValues object retrieves the command contexts used to describe commands issued by the client and responses made by the server. The command context therefore contains request and response contexts. The request contexts contain client requests and server events. The response contexts include the response by a server to a request. For example, if a client requests a specific stream, the request context contains the URL identifying that stream on the origin server. However, if the client is redirected to a different location, the response context contains a redirection URL.
Note
Note This object is only available through scripting languages used by the WMS Active Script Event Handler plug-in. The object is passed to the script file associated with the plug-in on event notifications. For more information, see WMS Active Script Event Handler Plug-in Properties.
The IWMSCommandValues object exposes the following properties and methods.
Property |
Description |
---|---|
Request |
Retrieves an IWMSNamedValuesIWMSNamedValues Object (Visual Basic .NET) containing a collection of name-value pairs from a command context. |
Response |
Retrieves an IWMSNamedValues object containing a collection of name-value pairs from a response context. |
Method |
Description |
---|---|
EraseRequest |
Removes all name-value pairs from the request command context. |
EraseResponse |
Removes all name-value pairs from the response command context. |
Example
The following example illustrates how to handle a connect event using VBScript.
Sub OnWMSEConnect(HR, UserCtx, PresCtx, CmdCtx)
MsgBox "A Client has Connected"
MsgBox "HRESULT: " & HR
MsgBox "Client’s IP Address: " & _
UserCtx("WMS_USER_IP_ADDRESS_STRING").Value
' The following will also return the same value
MsgBox "Same User IP Address: " & _
UserCtx.Item(“WMS_USER_IP_ADDRESS_STRING”)
' The following will return the total number of items in the context
MsgBox "# of items in the User Context: " & UserCtx.Count
End Sub