new MessageChannelTransport(port) → {MessageChannelTransport}
Transport Class for HTML5 MessageChannels
Parameters:
| Name | Type | Description |
|---|---|---|
port |
MessageChannel_Port | one end of an HTML MessageChannel |
Returns:
Methods
-
connect(face, onopenCallback)
-
Set the event listener for incoming elements
Parameters:
Name Type Description faceObject the ndn.Face object that this transport is attached to onopenCallbackfunction a callback to be performed once the transport is open -
send(element)
-
Send the Uint8Array data.
Parameters:
Name Type Description elementBuffer the data packet