-
Nested Class Summary
Nested Classes
static final record
Data structure for ICE server information.
static interface
Functional interface for handling incoming signals.
-
Method Summary
void
Closes the signaling channel and releases any associated resources.
Returns the Local Network ID of this client as a String.
boolean
Whether the signaling is connected and able to carry messages
void
Removes the signaling handler for a specific connection ID.
default void
Sends a full SDP message with all candidates to the remote peer
TODO Find a better name
default void
Sends a signaling message to the remote peer.
void
Sets a handler to receive signaling messages for a specific connection ID.
-
Method Details
-
sendSignal
default void sendSignal(String targetNetworkId,
String data)
Sends a signaling message to the remote peer.
- Parameters:
targetNetworkId - The Network ID of the destination (String to support Realms).
data - The raw signaling payload.
-
sendFullSdp
default void sendFullSdp(String targetNetworkId,
String sdp)
Sends a full SDP message with all candidates to the remote peer
TODO Find a better name
- Parameters:
targetNetworkId - The Network ID of the destination (String to support Realms).
sdp - The full SDP message with all candidates.
-
setSignalHandler
Sets a handler to receive signaling messages for a specific connection ID.
- Parameters:
connectionId - The connection ID to listen for.
handler - The handler to process incoming signaling messages.
-
removeSignalHandler
void removeSignalHandler(long connectionId)
Removes the signaling handler for a specific connection ID.
- Parameters:
connectionId - The connection ID whose handler should be removed.
-
getLocalNetworkId
Returns the Local Network ID of this client as a String.
This is required for formatting the 'candidate:' string in SDP.
-
isActive
boolean isActive()
Whether the signaling is connected and able to carry messages
-
close
void close()
Closes the signaling channel and releases any associated resources.
- Specified by:
close in interface AutoCloseable