Package org.lwjgl.util.remotery
Class RMTSettings
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<RMTSettings>
org.lwjgl.util.remotery.RMTSettings
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class RMTSettings
extends org.lwjgl.system.Struct<RMTSettings>
implements org.lwjgl.system.NativeResource
Structure to fill in to modify Remotery default settings.
Layout
struct rmtSettings {
rmtU16 port();
rmtBool reuse_open_port();
rmtBool limit_connections_to_localhost();
rmtBool enableThreadSampler();
rmtU32 msSleepBetweenServerUpdates();
rmtU32 messageQueueSizeInBytes();
rmtU32 maxNbMessagesPerUpdate();
rmtMallocPtr _malloc();
rmtReallocPtr realloc();
rmtFreePtr _free();
void * mm_context();
rmtInputHandlerPtr input_handler();
rmtSampleTreeHandlerPtr sampletree_handler();
void * sampletree_context;
rmtPropertyHandlerPtr snapshot_callback();
void * snapshot_context;
void * input_handler_context();
rmtPStr logPath;
}-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionRMTSettings(ByteBuffer container) Creates aRMTSettingsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription_free()callback pointer for memory allocationSets the specified value to the_free()field._malloc()callback pointer for memory allocation_malloc(RMTMallocI value) Sets the specified value to the_malloc()field.static RMTSettingscalloc()Returns a newRMTSettingsinstance allocated withmemCalloc.static RMTSettingscalloc(org.lwjgl.system.MemoryStack stack) Returns a newRMTSettingsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RMTSettingsDeprecated.static RMTSettingscallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static RMTSettingscreate()Returns a newRMTSettingsinstance allocated withBufferUtils.static RMTSettingscreate(long address) Returns a newRMTSettingsinstance for the specified memory address.static @Nullable RMTSettingscreateSafe(long address) booleanWhether to enable runtime thread sampling that discovers which processors a thread is running on.enableThreadSampler(boolean value) Sets the specified value to theenableThreadSampler()field.@Nullable RMTInputHandlercallback pointer for receiving input from the Remotery consoleinput_handler(@Nullable RMTInputHandlerI value) Sets the specified value to theinput_handler()field.longcontext pointer that gets sent to Remotery console callback functioninput_handler_context(long value) Sets the specified value to theinput_handler_context()field.booleanOnly allow connections on localhost?limit_connections_to_localhost(boolean value) Sets the specified value to thelimit_connections_to_localhost()field.@Nullable ByteBufferlogPath()logPath(@Nullable ByteBuffer value) Sets the address of the specified encoded string to thelogPathfield.@Nullable Stringstatic RMTSettingsmalloc()Returns a newRMTSettingsinstance allocated withmemAlloc.static RMTSettingsmalloc(org.lwjgl.system.MemoryStack stack) Returns a newRMTSettingsinstance allocated on the specifiedMemoryStack.static RMTSettingsDeprecated.static RMTSettingsmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.intif 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 loopmaxNbMessagesPerUpdate(int value) Sets the specified value to themaxNbMessagesPerUpdate()field.intsize of the internal message queues Remotery uses.messageQueueSizeInBytes(int value) Sets the specified value to themessageQueueSizeInBytes()field.longmemory allocation context pointermm_context(long value) Sets the specified value to themm_context()field.inthow long to sleep between server updates, hopefully trying to give a little CPU back to other threadsmsSleepBetweenServerUpdates(int value) Sets the specified value to themsSleepBetweenServerUpdates()field.static RMTFreen_free(long struct) Unsafe version of_free().static voidUnsafe version of_free.static RMTMallocn_malloc(long struct) Unsafe version of_malloc().static voidn_malloc(long struct, RMTMallocI value) Unsafe version of_malloc.static intnenableThreadSampler(long struct) Unsafe version ofenableThreadSampler().static voidnenableThreadSampler(long struct, int value) Unsafe version ofenableThreadSampler.static @Nullable RMTInputHandlerninput_handler(long struct) Unsafe version ofinput_handler().static voidninput_handler(long struct, @Nullable RMTInputHandlerI value) Unsafe version ofinput_handler.static longninput_handler_context(long struct) Unsafe version ofinput_handler_context().static voidninput_handler_context(long struct, long value) Unsafe version ofinput_handler_context.static intnlimit_connections_to_localhost(long struct) Unsafe version oflimit_connections_to_localhost().static voidnlimit_connections_to_localhost(long struct, int value) Unsafe version oflimit_connections_to_localhost.static @Nullable ByteBuffernlogPath(long struct) Unsafe version oflogPath().static voidnlogPath(long struct, @Nullable ByteBuffer value) Unsafe version oflogPath.static @Nullable StringnlogPathString(long struct) Unsafe version oflogPathString().static intnmaxNbMessagesPerUpdate(long struct) Unsafe version ofmaxNbMessagesPerUpdate().static voidnmaxNbMessagesPerUpdate(long struct, int value) Unsafe version ofmaxNbMessagesPerUpdate.static intnmessageQueueSizeInBytes(long struct) Unsafe version ofmessageQueueSizeInBytes().static voidnmessageQueueSizeInBytes(long struct, int value) Unsafe version ofmessageQueueSizeInBytes.static longnmm_context(long struct) Unsafe version ofmm_context().static voidnmm_context(long struct, long value) Unsafe version ofmm_context.static intnmsSleepBetweenServerUpdates(long struct) Unsafe version ofmsSleepBetweenServerUpdates().static voidnmsSleepBetweenServerUpdates(long struct, int value) Unsafe version ofmsSleepBetweenServerUpdates.static shortnport(long struct) Unsafe version ofport().static voidnport(long struct, short value) Unsafe version ofport.static RMTReallocnrealloc(long struct) Unsafe version ofrealloc().static voidnrealloc(long struct, RMTReallocI value) Unsafe version ofrealloc.static intnreuse_open_port(long struct) Unsafe version ofreuse_open_port().static voidnreuse_open_port(long struct, int value) Unsafe version ofreuse_open_port.static longnsampletree_context(long struct) Unsafe version ofsampletree_context().static voidnsampletree_context(long struct, long value) Unsafe version ofsampletree_context.static @Nullable RMTSampleTreeHandlernsampletree_handler(long struct) Unsafe version ofsampletree_handler().static voidnsampletree_handler(long struct, @Nullable RMTSampleTreeHandlerI value) Unsafe version ofsampletree_handler.static @Nullable RMTPropertyHandlernsnapshot_callback(long struct) Unsafe version ofsnapshot_callback().static voidnsnapshot_callback(long struct, @Nullable RMTPropertyHandlerI value) Unsafe version ofsnapshot_callback.static longnsnapshot_context(long struct) Unsafe version ofsnapshot_context().static voidnsnapshot_context(long struct, long value) Unsafe version ofsnapshot_context.shortport()which port to listen for incoming connections onport(short value) Sets the specified value to theport()field.realloc()callback pointer for memory allocationrealloc(RMTReallocI value) Sets the specified value to therealloc()field.booleanwhen this server exits it can leave the port open inTIME_WAITstate for a while.reuse_open_port(boolean value) Sets the specified value to thereuse_open_port()field.longsampletree_context(long value) Sets the specified value to thesampletree_contextfield.@Nullable RMTSampleTreeHandlercallback pointer for traversing the sample tree graphsampletree_handler(@Nullable RMTSampleTreeHandlerI value) Sets the specified value to thesampletree_handler()field.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, @Nullable RMTInputHandlerI input_handler, @Nullable RMTSampleTreeHandlerI sampletree_handler, long sampletree_context, @Nullable RMTPropertyHandlerI snapshot_callback, long snapshot_context, long input_handler_context, @Nullable ByteBuffer logPath) Initializes this struct with the specified values.set(RMTSettings src) Copies the specified struct data to this struct.intsizeof()@Nullable RMTPropertyHandlercallback pointer for traversing the property graphsnapshot_callback(@Nullable RMTPropertyHandlerI value) Sets the specified value to thesnapshot_callback()field.longsnapshot_context(long value) Sets the specified value to thesnapshot_contextfield.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
PORT
public static final int PORTThe struct member offsets. -
REUSE_OPEN_PORT
public static final int REUSE_OPEN_PORTThe struct member offsets. -
LIMIT_CONNECTIONS_TO_LOCALHOST
public static final int LIMIT_CONNECTIONS_TO_LOCALHOSTThe struct member offsets. -
ENABLETHREADSAMPLER
public static final int ENABLETHREADSAMPLERThe struct member offsets. -
MSSLEEPBETWEENSERVERUPDATES
public static final int MSSLEEPBETWEENSERVERUPDATESThe struct member offsets. -
MESSAGEQUEUESIZEINBYTES
public static final int MESSAGEQUEUESIZEINBYTESThe struct member offsets. -
MAXNBMESSAGESPERUPDATE
public static final int MAXNBMESSAGESPERUPDATEThe struct member offsets. -
_MALLOC
public static final int _MALLOCThe struct member offsets. -
REALLOC
public static final int REALLOCThe struct member offsets. -
_FREE
public static final int _FREEThe struct member offsets. -
MM_CONTEXT
public static final int MM_CONTEXTThe struct member offsets. -
INPUT_HANDLER
public static final int INPUT_HANDLERThe struct member offsets. -
SAMPLETREE_HANDLER
public static final int SAMPLETREE_HANDLERThe struct member offsets. -
SAMPLETREE_CONTEXT
public static final int SAMPLETREE_CONTEXTThe struct member offsets. -
SNAPSHOT_CALLBACK
public static final int SNAPSHOT_CALLBACKThe struct member offsets. -
SNAPSHOT_CONTEXT
public static final int SNAPSHOT_CONTEXTThe struct member offsets. -
INPUT_HANDLER_CONTEXT
public static final int INPUT_HANDLER_CONTEXTThe struct member offsets. -
LOGPATH
public static final int LOGPATHThe struct member offsets.
-
-
Constructor Details
-
RMTSettings
Creates aRMTSettingsinstance at the current position of the specifiedByteBuffercontainer. 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<RMTSettings>
-
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 inTIME_WAITstate 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
callback pointer for memory allocation -
realloc
callback pointer for memory allocation -
_free
callback pointer for memory allocation -
mm_context
public long mm_context()memory allocation context pointer -
input_handler
callback pointer for receiving input from the Remotery console -
sampletree_handler
callback pointer for traversing the sample tree graph -
sampletree_context
public long sampletree_context()- Returns:
- the value of the
sampletree_contextfield.
-
snapshot_callback
callback pointer for traversing the property graph -
snapshot_context
public long snapshot_context()- Returns:
- the value of the
snapshot_contextfield.
-
input_handler_context
public long input_handler_context()context pointer that gets sent to Remotery console callback function -
logPath
- Returns:
- a
ByteBufferview of the null-terminated string pointed to by thelogPathfield.
-
logPathString
- Returns:
- the null-terminated string pointed to by the
logPathfield.
-
port
Sets the specified value to theport()field. -
reuse_open_port
Sets the specified value to thereuse_open_port()field. -
limit_connections_to_localhost
Sets the specified value to thelimit_connections_to_localhost()field. -
enableThreadSampler
Sets the specified value to theenableThreadSampler()field. -
msSleepBetweenServerUpdates
Sets the specified value to themsSleepBetweenServerUpdates()field. -
messageQueueSizeInBytes
Sets the specified value to themessageQueueSizeInBytes()field. -
maxNbMessagesPerUpdate
Sets the specified value to themaxNbMessagesPerUpdate()field. -
_malloc
Sets the specified value to the_malloc()field. -
realloc
Sets the specified value to therealloc()field. -
_free
Sets the specified value to the_free()field. -
mm_context
Sets the specified value to themm_context()field. -
input_handler
Sets the specified value to theinput_handler()field. -
sampletree_handler
Sets the specified value to thesampletree_handler()field. -
sampletree_context
Sets the specified value to thesampletree_contextfield. -
snapshot_callback
Sets the specified value to thesnapshot_callback()field. -
snapshot_context
Sets the specified value to thesnapshot_contextfield. -
input_handler_context
Sets the specified value to theinput_handler_context()field. -
logPath
Sets the address of the specified encoded string to thelogPathfield. -
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, @Nullable RMTInputHandlerI input_handler, @Nullable RMTSampleTreeHandlerI sampletree_handler, long sampletree_context, @Nullable RMTPropertyHandlerI snapshot_callback, long snapshot_context, long input_handler_context, @Nullable ByteBuffer logPath) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newRMTSettingsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newRMTSettingsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newRMTSettingsinstance allocated withBufferUtils. -
create
Returns a newRMTSettingsinstance for the specified memory address. -
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
malloc
Returns a newRMTSettingsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newRMTSettingsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
nport
public static short nport(long struct) Unsafe version ofport(). -
nreuse_open_port
public static int nreuse_open_port(long struct) Unsafe version ofreuse_open_port(). -
nlimit_connections_to_localhost
public static int nlimit_connections_to_localhost(long struct) Unsafe version oflimit_connections_to_localhost(). -
nenableThreadSampler
public static int nenableThreadSampler(long struct) Unsafe version ofenableThreadSampler(). -
nmsSleepBetweenServerUpdates
public static int nmsSleepBetweenServerUpdates(long struct) Unsafe version ofmsSleepBetweenServerUpdates(). -
nmessageQueueSizeInBytes
public static int nmessageQueueSizeInBytes(long struct) Unsafe version ofmessageQueueSizeInBytes(). -
nmaxNbMessagesPerUpdate
public static int nmaxNbMessagesPerUpdate(long struct) Unsafe version ofmaxNbMessagesPerUpdate(). -
n_malloc
Unsafe version of_malloc(). -
nrealloc
Unsafe version ofrealloc(). -
n_free
Unsafe version of_free(). -
nmm_context
public static long nmm_context(long struct) Unsafe version ofmm_context(). -
ninput_handler
Unsafe version ofinput_handler(). -
nsampletree_handler
Unsafe version ofsampletree_handler(). -
nsampletree_context
public static long nsampletree_context(long struct) Unsafe version ofsampletree_context(). -
nsnapshot_callback
Unsafe version ofsnapshot_callback(). -
nsnapshot_context
public static long nsnapshot_context(long struct) Unsafe version ofsnapshot_context(). -
ninput_handler_context
public static long ninput_handler_context(long struct) Unsafe version ofinput_handler_context(). -
nlogPath
Unsafe version oflogPath(). -
nlogPathString
Unsafe version oflogPathString(). -
nport
public static void nport(long struct, short value) Unsafe version ofport. -
nreuse_open_port
public static void nreuse_open_port(long struct, int value) Unsafe version ofreuse_open_port. -
nlimit_connections_to_localhost
public static void nlimit_connections_to_localhost(long struct, int value) Unsafe version oflimit_connections_to_localhost. -
nenableThreadSampler
public static void nenableThreadSampler(long struct, int value) Unsafe version ofenableThreadSampler. -
nmsSleepBetweenServerUpdates
public static void nmsSleepBetweenServerUpdates(long struct, int value) Unsafe version ofmsSleepBetweenServerUpdates. -
nmessageQueueSizeInBytes
public static void nmessageQueueSizeInBytes(long struct, int value) Unsafe version ofmessageQueueSizeInBytes. -
nmaxNbMessagesPerUpdate
public static void nmaxNbMessagesPerUpdate(long struct, int value) Unsafe version ofmaxNbMessagesPerUpdate. -
n_malloc
Unsafe version of_malloc. -
nrealloc
Unsafe version ofrealloc. -
n_free
Unsafe version of_free. -
nmm_context
public static void nmm_context(long struct, long value) Unsafe version ofmm_context. -
ninput_handler
Unsafe version ofinput_handler. -
nsampletree_handler
Unsafe version ofsampletree_handler. -
nsampletree_context
public static void nsampletree_context(long struct, long value) Unsafe version ofsampletree_context. -
nsnapshot_callback
Unsafe version ofsnapshot_callback. -
nsnapshot_context
public static void nsnapshot_context(long struct, long value) Unsafe version ofsnapshot_context. -
ninput_handler_context
public static void ninput_handler_context(long struct, long value) Unsafe version ofinput_handler_context. -
nlogPath
Unsafe version oflogPath. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-