Package com.telnyx.webrtc.lib
Class DataChannel
java.lang.Object
com.telnyx.webrtc.lib.DataChannel
Java wrapper for a C++ DataChannelInterface.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJava version of C++ DataBuffer.static classJava wrapper for WebIDL RTCDataChannel.static interfaceJava version of C++ DataChannelObserver.static enumKeep in sync with DataChannelInterface::DataState. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturn the number of bytes of application data (UTF-8 text and binary data) that have been queued using SendBuffer but have not yet been transmitted to the network.voidclose()Close the channel.voiddispose()Dispose of native resources attached to this channel.intid()label()voidregisterObserver(DataChannel.Observer observer) Register `observer`, replacing any previously-registered observer.booleansend(DataChannel.Buffer buffer) Send `data` to the remote peer; return success.state()voidUnregister the (only) observer.
-
Constructor Details
-
DataChannel
public DataChannel(long nativeDataChannel)
-
-
Method Details
-
registerObserver
Register `observer`, replacing any previously-registered observer. -
unregisterObserver
public void unregisterObserver()Unregister the (only) observer. -
label
-
id
public int id() -
state
-
bufferedAmount
public long bufferedAmount()Return the number of bytes of application data (UTF-8 text and binary data) that have been queued using SendBuffer but have not yet been transmitted to the network. -
close
public void close()Close the channel. -
send
Send `data` to the remote peer; return success. -
dispose
public void dispose()Dispose of native resources attached to this channel.
-