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 face
Object the ndn.Face object that this transport is attached to onopenCallback
function a callback to be performed once the transport is open -
send(element)
-
Send the Uint8Array data.
Parameters:
Name Type Description element
Buffer the data packet