Class RMTSettings

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PORT, REUSE_OPEN_PORT, LIMIT_CONNECTIONS_TO_LOCALHOST, ENABLETHREADSAMPLER, MSSLEEPBETWEENSERVERUPDATES, MESSAGEQUEUESIZEINBYTES, MAXNBMESSAGESPERUPDATE, _MALLOC, REALLOC, _FREE, MM_CONTEXT, INPUT_HANDLER, INPUT_HANDLER_CONTEXT, LOGPATH

        The struct member offsets.
    • Constructor Detail

      • RMTSettings

        public RMTSettings​(java.nio.ByteBuffer container)
        Creates a RMTSettings instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • port

        public short port()
        which port to listen for incoming connections on
      • reuse_open_port

        public boolean reuse_open_port()
        when this server exits it can leave the port open in TIME_WAIT state for a while. This forces subsequent server bind attempts to fail when restarting. If you find restarts fail repeatedly with bind attempts, set this to true to forcibly reuse the open port.
      • limit_connections_to_localhost

        public boolean limit_connections_to_localhost()
        Only allow connections on localhost?

        For dev builds you may want to access your game from other devices but if you distribute a game to your players with Remotery active, probably best to limit connections to localhost.

      • enableThreadSampler

        public boolean enableThreadSampler()
        Whether to enable runtime thread sampling that discovers which processors a thread is running on.

        This will suspend and resume threads from outside repeatdly and inject code into each thread that automatically instruments the processor.

        Default: Enabled

      • msSleepBetweenServerUpdates

        public int msSleepBetweenServerUpdates()
        how long to sleep between server updates, hopefully trying to give a little CPU back to other threads
      • messageQueueSizeInBytes

        public int messageQueueSizeInBytes()
        size of the internal message queues Remotery uses. Will be rounded to page granularity of 64k.
      • maxNbMessagesPerUpdate

        public int maxNbMessagesPerUpdate()
        if the user continuously pushes to the message queue, the server network code won't get a chance to update unless there's an upper-limit on how many messages can be consumed per loop
      • _malloc, realloc, _free

        public RMTMalloc _malloc()
        
        public RMTRealloc realloc()
        
        public RMTFree _free()
        
        callback pointer for memory allocation
      • mm_context

        public long mm_context()
        memory allocation context pointer
      • input_handler

        public RMTInputHandler input_handler()
        callback pointer for receiving input from the Remotery console
      • input_handler_context

        public long input_handler_context()
        context pointer that gets sent to Remotery console callback function
      • logPath

        public java.nio.ByteBuffer logPath()
        Returns:
        a ByteBuffer view of the null-terminated string pointed to by the logPath field.
      • logPathString

        public java.lang.String logPathString()
        Returns:
        the null-terminated string pointed to by the logPath field.
      • port

        public RMTSettings port​(short value)
        Sets the specified value to the port() field.
      • logPath

        public RMTSettings logPath​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the logPath field.
      • set

        public RMTSettings set​(short port,
                               boolean reuse_open_port,
                               boolean limit_connections_to_localhost,
                               boolean enableThreadSampler,
                               int msSleepBetweenServerUpdates,
                               int messageQueueSizeInBytes,
                               int maxNbMessagesPerUpdate,
                               RMTMallocI _malloc,
                               RMTReallocI realloc,
                               RMTFreeI _free,
                               long mm_context,
                               RMTInputHandlerI input_handler,
                               long input_handler_context,
                               java.nio.ByteBuffer logPath)
        Initializes this struct with the specified values.
      • set

        public RMTSettings set​(RMTSettings src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static RMTSettings malloc()
        Returns a new RMTSettings instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static RMTSettings calloc()
        Returns a new RMTSettings instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static RMTSettings create()
        Returns a new RMTSettings instance allocated with BufferUtils.
      • create

        public static RMTSettings create​(long address)
        Returns a new RMTSettings instance for the specified memory address.
      • createSafe

        @Nullable
        public static RMTSettings createSafe​(long address)
        Like create, but returns null if address is NULL.
      • mallocStack

        @Deprecated
        public static RMTSettings mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static RMTSettings callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • malloc

        public static RMTSettings malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new RMTSettings instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static RMTSettings calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new RMTSettings instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nport

        public static short nport​(long struct)
        Unsafe version of port().
      • nreuse_open_port

        public static int nreuse_open_port​(long struct)
        Unsafe version of reuse_open_port().
      • nenableThreadSampler

        public static int nenableThreadSampler​(long struct)
        Unsafe version of enableThreadSampler().
      • nmsSleepBetweenServerUpdates

        public static int nmsSleepBetweenServerUpdates​(long struct)
      • nmessageQueueSizeInBytes

        public static int nmessageQueueSizeInBytes​(long struct)
        Unsafe version of messageQueueSizeInBytes().
      • nmaxNbMessagesPerUpdate

        public static int nmaxNbMessagesPerUpdate​(long struct)
        Unsafe version of maxNbMessagesPerUpdate().
      • n_malloc

        public static RMTMalloc n_malloc​(long struct)
        Unsafe version of _malloc().
      • n_free

        public static RMTFree n_free​(long struct)
        Unsafe version of _free().
      • nmm_context

        public static long nmm_context​(long struct)
        Unsafe version of mm_context().
      • ninput_handler_context

        public static long ninput_handler_context​(long struct)
        Unsafe version of input_handler_context().
      • nlogPath

        public static java.nio.ByteBuffer nlogPath​(long struct)
        Unsafe version of logPath().
      • nlogPathString

        public static java.lang.String nlogPathString​(long struct)
        Unsafe version of logPathString().
      • nport

        public static void nport​(long struct,
                                 short value)
        Unsafe version of port.
      • nreuse_open_port

        public static void nreuse_open_port​(long struct,
                                            int value)
        Unsafe version of reuse_open_port.
      • nlimit_connections_to_localhost

        public static void nlimit_connections_to_localhost​(long struct,
                                                           int value)
      • nenableThreadSampler

        public static void nenableThreadSampler​(long struct,
                                                int value)
        Unsafe version of enableThreadSampler.
      • nmsSleepBetweenServerUpdates

        public static void nmsSleepBetweenServerUpdates​(long struct,
                                                        int value)
        Unsafe version of msSleepBetweenServerUpdates.
      • nmessageQueueSizeInBytes

        public static void nmessageQueueSizeInBytes​(long struct,
                                                    int value)
        Unsafe version of messageQueueSizeInBytes.
      • nmaxNbMessagesPerUpdate

        public static void nmaxNbMessagesPerUpdate​(long struct,
                                                   int value)
        Unsafe version of maxNbMessagesPerUpdate.
      • n_malloc

        public static void n_malloc​(long struct,
                                    RMTMallocI value)
        Unsafe version of _malloc.
      • nrealloc

        public static void nrealloc​(long struct,
                                    RMTReallocI value)
        Unsafe version of realloc.
      • n_free

        public static void n_free​(long struct,
                                  RMTFreeI value)
        Unsafe version of _free.
      • nmm_context

        public static void nmm_context​(long struct,
                                       long value)
        Unsafe version of mm_context.
      • ninput_handler_context

        public static void ninput_handler_context​(long struct,
                                                  long value)
        Unsafe version of input_handler_context.
      • nlogPath

        public static void nlogPath​(long struct,
                                    java.nio.ByteBuffer value)
        Unsafe version of logPath.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate