Class NostrTURN


  • public class NostrTURN
    extends java.lang.Object
    TURN implemented on top of nostr relays. When a p2p connection is not possible, the packets can be relayed through a nostr relay using this class. The packets are automatically compressed, encrypted and split into chunks to ensure a reliable and private connection through public relays. Note: this might cause unexpected heavy load on the relays, so use it only with relays that explicitly support this kind of workload.
    • Method Detail

      • start

        public void start()
      • close

        public void close()
      • write

        public org.ngengine.platform.AsyncTask<java.lang.Void> write​(java.nio.ByteBuffer data)
        Send some data to the remote peer.
        Parameters:
        data - the data to send
        Returns:
        a promise that resolves when the data is sent