Package tvi.webrtc
Class DataChannel
java.lang.Object
tvi.webrtc.DataChannel
Java wrapper for a C++ DataChannelInterface.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Java version of C++ DataBuffer.static class
Java wrapper for WebIDL RTCDataChannel.static interface
Java version of C++ DataChannelObserver.static enum
Keep in sync with DataChannelInterface::DataState. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
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.void
close()
Close the channel.void
dispose()
Dispose of native resources attached to this channel.int
id()
label()
void
registerObserver
(DataChannel.Observer observer) Register `observer`, replacing any previously-registered observer.boolean
send
(DataChannel.Buffer buffer) Send `data` to the remote peer; return success.state()
void
Unregister 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.
-