Package tvi.webrtc
Class DataChannel
- java.lang.Object
-
- tvi.webrtc.DataChannel
-
public class DataChannel extends java.lang.ObjectJava wrapper for a C++ DataChannelInterface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataChannel.BufferJava version of C++ DataBuffer.static classDataChannel.InitJava wrapper for WebIDL RTCDataChannel.static interfaceDataChannel.ObserverJava version of C++ DataChannelObserver.static classDataChannel.StateKeep in sync with DataChannelInterface::DataState.
-
Constructor Summary
Constructors Constructor Description DataChannel(long nativeDataChannel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longbufferedAmount()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.voidclose()Close the channel.voiddispose()Dispose of native resources attached to this channel.intid()java.lang.Stringlabel()voidregisterObserver(DataChannel.Observer observer)Register |observer|, replacing any previously-registered observer.booleansend(DataChannel.Buffer buffer)Send |data| to the remote peer; return success.DataChannel.Statestate()voidunregisterObserver()Unregister the (only) observer.
-
-
-
Method Detail
-
registerObserver
public void registerObserver(DataChannel.Observer observer)
Register |observer|, replacing any previously-registered observer.
-
unregisterObserver
public void unregisterObserver()
Unregister the (only) observer.
-
label
public java.lang.String label()
-
id
public int id()
-
state
public DataChannel.State 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
public boolean send(DataChannel.Buffer buffer)
Send |data| to the remote peer; return success.
-
dispose
public void dispose()
Dispose of native resources attached to this channel.
-
-