Package io.dapr.utils

Class NetworkUtils


  • public final class NetworkUtils
    extends Object
    Utility methods for network, internal to Dapr SDK.
    • Method Detail

      • waitForSocket

        public static void waitForSocket​(String host,
                                         int port,
                                         int timeoutInMilliseconds)
                                  throws InterruptedException
        Tries to connect to a socket, retrying every 1 second.
        Parameters:
        host - Host to connect to.
        port - Port to connect to.
        timeoutInMilliseconds - Timeout in milliseconds to give up trying.
        Throws:
        InterruptedException - If retry is interrupted.