Skip to content

Namespace: receiver




(static) Utils

Utils to read/write from/to an Uint8Array.Supported reading/writing of 1-4 bytes of data. Refer to individual api examples to construct/parse the packet as per structure. You may refer sample VC examples (ping, mix and over) provided for more details on usage.


Name Type Description
utils Object Object of Utils

(readonly) apiVersion


Name Type Description
apiVersion String Virtual Channel SDK for Chrome version.


(static) onMessage(event)

Thirdparty should listen for window.onmessage. When Thirdparty receive citrix related messages then it should check origin of message. After verifying origin, message should be passed using citrix.receiver.onMessage(event)


Name Type Description
event Object Received message. Citrix messages can be filter out using event['data]['source'] == 'CITRIX' && event['data']['destination'] == 'VCSDK'. Note:These comparisons should not be used to trust messages origin.


window.onmessage = (event)=>{
    //verify origin of event
    if(event['origin] == 'trusted url'
         && event['data]['source'] == 'CITRIX' //TO filter out citrix related messages
         && event['data']['destination'] == 'VCSDK')

(static) registerVC(vcInfo) → {CustomVC}

Registers the handlers for the virtual channel and returns the object that needs to be stored.


All the sessions would use the same callbacks for each functionality.Session id should be used to differentiate between different sessions.


Name Type Description
vcInfo Object Object containing the details of the virtual channel name, version, description and the callbacks for various functionalities
Properties of vcInfo
Name Type Attributes Description
streamName String Virtual Channel name. Should be an ASCII string with a maximum of 7 letters.
description String Description of the Virtual channel
minVersion String Lowest supported version of this virtual channel, used to allow version negotiation between the client-side and the server-side components.
maxVersion String Highest supported version of this virtual channel, used to allow version negotiation between the client-side and the server-side components.
driverOpen driverOpen Callback that gets called when the virtual channel is about to be opened in the session. Will be called for each session launch.
driverInfo driverInfo Callback that gets called to send any information about the virtual channel.Will be called for each session launch.
icaDataArrival icaDataArrival Callback set for receiving the ica packet from the server side component of virtual channel.
driverClose driverClose Callback set for receiving the virtual channel close in the session.


Error during registration of Virtual Channel.




Object of CustomVC.




//Registering CTXPING virtual channel
    var ctxping = citrix.receiver.registerVC({"streamName":"CTXPING",
Was this article helpful?