Interface Net

    • Method Detail

      • cancelHttpRequest

        void cancelHttpRequest​(Net.HttpRequest httpRequest)
      • newServerSocket

        ServerSocket newServerSocket​(Net.Protocol protocol,
                                     java.lang.String hostname,
                                     int port,
                                     ServerSocketHints hints)
        Creates a new server socket on the given address and port, using the given Net.Protocol, waiting for incoming connections.
        Parameters:
        hostname - the hostname or ip address to bind the socket to
        port - the port to listen on
        hints - additional ServerSocketHints used to create the socket. Input null to use the default setting provided by the system.
        Returns:
        the ServerSocket
        Throws:
        GdxRuntimeException - in case the socket couldn't be opened
      • newClientSocket

        Socket newClientSocket​(Net.Protocol protocol,
                               java.lang.String host,
                               int port,
                               SocketHints hints)
        Creates a new TCP client socket that connects to the given host and port.
        Parameters:
        host - the host address
        port - the port
        hints - additional SocketHints used to create the socket. Input null to use the default setting provided by the system.
        Throws:
        GdxRuntimeException - in case the socket couldn't be opened
      • openURI

        boolean openURI​(java.lang.String URI)
        Launches the default browser to display a URI. If the default browser is not able to handle the specified URI, the application registered for handling URIs of the specified type is invoked. The application is determined from the protocol and path of the URI. A best effort is made to open the given URI; however, since external applications are involved, no guarantee can be made as to whether the URI was actually opened. If it is known that the URI was not opened, false will be returned; otherwise, true will be returned.
        Parameters:
        URI - the URI to be opened.
        Returns:
        false if it is known the uri was not opened, true otherwise.