Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
TransportCallback

TransportCallback Class Reference

Constructors

Instance Methods

Constructors

new TransportCallback()

Initializes an instance of TransportCallback.

Instance Methods

transportCallback.onConnectionEstablished()

Safely attempts to invoke the onConnectionEstablished method.

Kind: Instance method of TransportCallback

transportCallback.onConnectionTerminated(reason)

Safely attempts to invoke the onConnectionTerminated method.

Kind: Instance method of TransportCallback

ParamTypeDescription
reason String A reason for the termination.

transportCallback.onError()

Safely attempts to invoke the onError method.

Kind: Instance method of TransportCallback

transportCallback.onPacketReceived(packet)

Safely attempts to invoke the onPacketReceived method.

Kind: Instance method of TransportCallback

ParamTypeDescription
packet _SdlPacket An _SdlPacket.

transportCallback.setOnConnectionEstablished(listener) ⇒ TransportCallback

Sets the onConnectionEstablished callback.

Kind: Instance method of TransportCallback
Returns: TransportCallback - A class reference to allow method chaining.

ParamTypeDescription
listener function A Function to be invoked when the event is triggered.

transportCallback.setOnConnectionTerminated(listener) ⇒ TransportCallback

Sets the onConnectionTerminated callback.

Kind: Instance method of TransportCallback
Returns: TransportCallback - A class reference to allow method chaining.

ParamTypeDescription
listener function A Function to be invoked when the event is triggered.

transportCallback.setOnError(listener) ⇒ TransportCallback

Sets the onError callback.

Kind: Instance method of TransportCallback
Returns: TransportCallback - A class reference to allow method chaining.

ParamTypeDescription
listener function A Function to be invoked when the event is triggered.

transportCallback.setOnPacketReceived(listener) ⇒ TransportCallback

Sets the onPacketReceived callback.

Kind: Instance method of TransportCallback
Returns: TransportCallback - A class reference to allow method chaining.

ParamTypeDescription
listener function A Function to be invoked when the event is triggered.
View on GitHub.com
Previous Section Next Section