public class DefaultTCPStreamConnector extends Object implements StreamConnector
close() is invoked.StreamConnector.Protocol| Modifier and Type | Field and Description |
|---|---|
protected Socket |
controlSocket
The Socket that a stream should use for control data
(e.g.
|
protected Socket |
dataSocket
The Socket that a stream should use for data (e.g.
|
protected boolean |
rtcpmux
Whether this DefaultStreamConnector uses rtcp-mux.
|
| Constructor and Description |
|---|
DefaultTCPStreamConnector()
Initializes a new DefaultTCPStreamConnector instance with no
control and data Sockets.
|
DefaultTCPStreamConnector(Socket dataSocket,
Socket controlSocket)
Initializes a new DefaultTCPStreamConnector instance which is to
represent a specific pair of control and data Sockets.
|
DefaultTCPStreamConnector(Socket dataSocket,
Socket controlSocket,
boolean rtcpmux)
Initializes a new DefaultTCPStreamConnector instance which is to
represent a specific pair of control and data Sockets.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases the resources allocated by this instance in the course of its
execution and prepares it to be garbage collected.
|
DatagramSocket |
getControlSocket()
Returns a reference to the DatagramSocket that a stream should
use for control data (e.g.
|
Socket |
getControlTCPSocket()
Returns a reference to the Socket that a stream should
use for control data (e.g.
|
DatagramSocket |
getDataSocket()
Returns a reference to the DatagramSocket that a stream should
use for data (e.g.
|
Socket |
getDataTCPSocket()
Returns a reference to the Socket that a stream should
use for data (e.g.
|
StreamConnector.Protocol |
getProtocol()
Returns the protocol of this StreamConnector.
|
boolean |
isRtcpmux()
Returns true if this StreamConnector uses rtcp-mux,
that is, if its data and control sockets share the same local address
and port.
|
void |
started()
Notifies this instance that utilization of its Sockets
for data and/or control traffic has started.
|
void |
stopped()
Notifies this instance that utilization of its Sockets
for data and/or control traffic has temporarily stopped.
|
protected Socket controlSocket
protected Socket dataSocket
protected boolean rtcpmux
public DefaultTCPStreamConnector()
Suitable for extenders willing to delay the creation of the control and
data sockets. For example, they could override
getControlSocket() and/or getDataSocket() and create
them on demand.
public DefaultTCPStreamConnector(Socket dataSocket, Socket controlSocket)
dataSocket - the Socket to be used for data (e.g.
RTP) trafficcontrolSocket - the Socket to be used for control
data (e.g. RTCP) trafficpublic DefaultTCPStreamConnector(Socket dataSocket, Socket controlSocket, boolean rtcpmux)
dataSocket - the Socket to be used for data (e.g.
RTP) trafficcontrolSocket - the Socket to be used for control
data (e.g. RTCP) trafficrtcpmux - whether rtcpmux is used.public void close()
close in interface StreamConnectorStreamConnector.close()public DatagramSocket getControlSocket()
getControlSocket in interface StreamConnectorStreamConnector.getControlSocket()public DatagramSocket getDataSocket()
getDataSocket in interface StreamConnectorStreamConnector.getDataSocket()public Socket getDataTCPSocket()
getDataTCPSocket in interface StreamConnectorpublic Socket getControlTCPSocket()
getControlTCPSocket in interface StreamConnectorpublic StreamConnector.Protocol getProtocol()
getProtocol in interface StreamConnectorpublic void started()
started in interface StreamConnectorStreamConnector.started()public void stopped()
stopped in interface StreamConnectorStreamConnector.stopped()public boolean isRtcpmux()
isRtcpmux in interface StreamConnectorCopyright © 2022 jitsi.org. All rights reserved.