Class NioClient

    • Constructor Detail

      • NioClient

        public NioClient​( serverAddress,
                         StreamConnection parser,
                         java.time.Duration connectTimeout)

        Creates a new client to the given server address using the given StreamConnection to decode the data. The given connection MUST be unique to this object. This does not block while waiting for the connection to open, but will call either the StreamConnection.connectionOpened() or StreamConnection.connectionClosed() callback on the created network event processing thread.

        serverAddress - socket address of the server to connect to
        parser - parses data from the server
        connectTimeout - timeout for establishing a connection to the server, or ZERO for no timeout