Switch to: V14V13V12V11V10V9V8V7V6V5

VNotificationCenter Class: Channel Methods

VNotificationCenter.Channels()

Declaration:

Channels() as VStringArray()

Description:

Returns array of all channel name, which exists on the VServer.

Example:

dim allChannels as VStringArray
dim nc as VNotificationCenter
...
allChannels = nc.Channels()

VNotificationCenter.SubscribedChannels()

Declaration:

SubscribedChannels() as VStringArray

Description:

Returns array of channel names to which you subscribed.

Example:

dim myChannels as VStringArray
dim nc as VNotificationCenter
...
myChannels = nc.SubscribedChannels()

VNotificationCenter.Subscribe()

Declaration:

Subscribe( inChannel as String )

Parameters:

* inChannel - the name of channel.

Description:

This method allows you to subscribe to a channel by its name. If channel does not exist then it will be created at this point.

Example:

dim nc as VNotificationCenter
...
nc.Subscribe( "teamChannel" )

VNotificationCenter.Unsubscribe()

Declaration:

Unsubscribe( inChannel as String )

* inChannel - the name of channel.

Description:

This method allows you to unsubscribe from a channel by its name.

Example:

dim nc as VNotificationCenter
...
nc.Unsubscribe( "teamChannel" )

VNotificationCenter.UnsubscribeAll()

Declaration:

UnsubscribeAll()

Description:

This method allows you to unsubscribe from all channels.

Example:

dim nc as VNotificationCenter
...
nc.UnsubscribeAll()