Class NostrRTCSocket
java.lang.Object
org.ngengine.nostr4j.rtc.NostrRTCSocket
An RTC socket between two peers.
This class will try to establish a direct connection between the two peers, when
not possible it will fallback to a TURN server.
Note:
isRTCConnected() reports RTC transport connectivity only.
TURN failover is internal and surfaced through listeners transport switch events.
This is because, to avoid inefficiencies, the keep-alive mechanism is implemented only in the
signaling protocol: when the signaling announce is stale, the socket should be closed using close().
So keep in mind that you need to handle keep-alive youself, if you want to use this class by itself (without the signaling protocol).
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the local peer.Get the remote peer if connected, otherwise null.booleanisClosed()
-
Field Details
-
DEFAULT_CHANNEL_NAME
- See Also:
-
-
Method Details
-
getLocalPeer
-
getRemotePeer
Get the remote peer if connected, otherwise null.- Returns:
- The remote peer or null.
-
isClosed
public boolean isClosed()
-