public class RMTSettings
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
port – which port to listen for incoming connections onreuse_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 –
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.
msSleepBetweenServerUpdates – how long to sleep between server updates, hopefully trying to give a little CPU back to other threadsmessageQueueSizeInBytes – size of the internal message queues Remotery uses. Will be rounded to page granularity of 64k.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 allocationrealloc – callback pointer for memory allocation_free – callback pointer for memory allocationmm_context – memory allocation context pointerinput_handler – callback pointer for receiving input from the Remotery consoleinput_handler_context – context pointer that gets sent to Remotery console callback function
struct rmtSettings {
rmtU16 port;
rmtBool reuse_open_port;
rmtBool limit_connections_to_localhost;
rmtU32 msSleepBetweenServerUpdates;
rmtU32 messageQueueSizeInBytes;
rmtU32 maxNbMessagesPerUpdate;
rmtMallocPtr _malloc;
rmtReallocPtr realloc;
rmtFreePtr _free;
void * mm_context;
rmtInputHandlerPtr input_handler;
void * input_handler_context;
rmtPStr logFilename;
}| Modifier and Type | Field and Description |
|---|---|
static int |
_FREE
The struct member offsets.
|
static int |
_MALLOC
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
INPUT_HANDLER
The struct member offsets.
|
static int |
INPUT_HANDLER_CONTEXT
The struct member offsets.
|
static int |
LIMIT_CONNECTIONS_TO_LOCALHOST
The struct member offsets.
|
static int |
LOGFILENAME
The struct member offsets.
|
static int |
MAXNBMESSAGESPERUPDATE
The struct member offsets.
|
static int |
MESSAGEQUEUESIZEINBYTES
The struct member offsets.
|
static int |
MM_CONTEXT
The struct member offsets.
|
static int |
MSSLEEPBETWEENSERVERUPDATES
The struct member offsets.
|
static int |
PORT
The struct member offsets.
|
static int |
REALLOC
The struct member offsets.
|
static int |
REUSE_OPEN_PORT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
RMTSettings(java.nio.ByteBuffer container)
Creates a
RMTSettings instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
RMTFree |
_free()
Returns the value of the
_free field. |
RMTSettings |
_free(RMTFreeI value)
Sets the specified value to the
_free field. |
RMTMalloc |
_malloc()
Returns the value of the
_malloc field. |
RMTSettings |
_malloc(RMTMallocI value)
Sets the specified value to the
_malloc field. |
static RMTSettings |
calloc()
Returns a new
RMTSettings instance allocated with memCalloc. |
static RMTSettings |
callocStack()
Returns a new
RMTSettings instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static RMTSettings |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
RMTSettings instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static RMTSettings |
create()
Returns a new
RMTSettings instance allocated with BufferUtils. |
static RMTSettings |
create(long address)
Returns a new
RMTSettings instance for the specified memory address. |
static RMTSettings |
createSafe(long address)
|
long |
input_handler_context()
Returns the value of the
input_handler_context field. |
RMTSettings |
input_handler_context(long value)
Sets the specified value to the
input_handler_context field. |
RMTInputHandler |
input_handler()
Returns the value of the
input_handler field. |
RMTSettings |
input_handler(RMTInputHandlerI value)
Sets the specified value to the
input_handler field. |
int |
limit_connections_to_localhost()
Returns the value of the
limit_connections_to_localhost field. |
RMTSettings |
limit_connections_to_localhost(int value)
Sets the specified value to the
limit_connections_to_localhost field. |
java.nio.ByteBuffer |
logFilename()
Returns a
ByteBuffer view of the null-terminated string pointed to by the logFilename field. |
RMTSettings |
logFilename(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to the
logFilename field. |
java.lang.String |
logFilenameString()
Decodes the null-terminated string pointed to by the
logFilename field. |
static RMTSettings |
malloc()
Returns a new
RMTSettings instance allocated with memAlloc. |
static RMTSettings |
mallocStack()
Returns a new
RMTSettings instance allocated on the thread-local MemoryStack. |
static RMTSettings |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
RMTSettings instance allocated on the specified MemoryStack. |
int |
maxNbMessagesPerUpdate()
Returns the value of the
maxNbMessagesPerUpdate field. |
RMTSettings |
maxNbMessagesPerUpdate(int value)
Sets the specified value to the
maxNbMessagesPerUpdate field. |
int |
messageQueueSizeInBytes()
Returns the value of the
messageQueueSizeInBytes field. |
RMTSettings |
messageQueueSizeInBytes(int value)
Sets the specified value to the
messageQueueSizeInBytes field. |
long |
mm_context()
Returns the value of the
mm_context field. |
RMTSettings |
mm_context(long value)
Sets the specified value to the
mm_context field. |
int |
msSleepBetweenServerUpdates()
Returns the value of the
msSleepBetweenServerUpdates field. |
RMTSettings |
msSleepBetweenServerUpdates(int value)
Sets the specified value to the
msSleepBetweenServerUpdates field. |
static RMTFree |
n_free(long struct)
Unsafe version of
_free(). |
static void |
n_free(long struct,
RMTFreeI value)
Unsafe version of
_free. |
static RMTMalloc |
n_malloc(long struct)
Unsafe version of
_malloc(). |
static void |
n_malloc(long struct,
RMTMallocI value)
Unsafe version of
_malloc. |
static long |
ninput_handler_context(long struct)
Unsafe version of
input_handler_context(). |
static void |
ninput_handler_context(long struct,
long value)
Unsafe version of
input_handler_context. |
static RMTInputHandler |
ninput_handler(long struct)
Unsafe version of
input_handler(). |
static void |
ninput_handler(long struct,
RMTInputHandlerI value)
Unsafe version of
input_handler. |
static int |
nlimit_connections_to_localhost(long struct)
Unsafe version of
limit_connections_to_localhost(). |
static void |
nlimit_connections_to_localhost(long struct,
int value)
Unsafe version of
limit_connections_to_localhost. |
static java.nio.ByteBuffer |
nlogFilename(long struct)
Unsafe version of
logFilename(). |
static void |
nlogFilename(long struct,
java.nio.ByteBuffer value)
Unsafe version of
logFilename. |
static java.lang.String |
nlogFilenameString(long struct)
Unsafe version of
logFilenameString(). |
static int |
nmaxNbMessagesPerUpdate(long struct)
Unsafe version of
maxNbMessagesPerUpdate(). |
static void |
nmaxNbMessagesPerUpdate(long struct,
int value)
Unsafe version of
maxNbMessagesPerUpdate. |
static int |
nmessageQueueSizeInBytes(long struct)
Unsafe version of
messageQueueSizeInBytes(). |
static void |
nmessageQueueSizeInBytes(long struct,
int value)
Unsafe version of
messageQueueSizeInBytes. |
static long |
nmm_context(long struct)
Unsafe version of
mm_context(). |
static void |
nmm_context(long struct,
long value)
Unsafe version of
mm_context. |
static int |
nmsSleepBetweenServerUpdates(long struct)
Unsafe version of
msSleepBetweenServerUpdates(). |
static void |
nmsSleepBetweenServerUpdates(long struct,
int value)
Unsafe version of
msSleepBetweenServerUpdates. |
static short |
nport(long struct)
Unsafe version of
port(). |
static void |
nport(long struct,
short value)
Unsafe version of
port. |
static RMTRealloc |
nrealloc(long struct)
Unsafe version of
realloc(). |
static void |
nrealloc(long struct,
RMTReallocI value)
Unsafe version of
realloc. |
static int |
nreuse_open_port(long struct)
Unsafe version of
reuse_open_port(). |
static void |
nreuse_open_port(long struct,
int value)
Unsafe version of
reuse_open_port. |
short |
port()
Returns the value of the
port field. |
RMTSettings |
port(short value)
Sets the specified value to the
port field. |
RMTRealloc |
realloc()
Returns the value of the
realloc field. |
RMTSettings |
realloc(RMTReallocI value)
Sets the specified value to the
realloc field. |
int |
reuse_open_port()
Returns the value of the
reuse_open_port field. |
RMTSettings |
reuse_open_port(int value)
Sets the specified value to the
reuse_open_port field. |
RMTSettings |
set(RMTSettings src)
Copies the specified struct data to this struct.
|
RMTSettings |
set(short port,
int reuse_open_port,
int limit_connections_to_localhost,
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 logFilename)
Initializes this struct with the specified values.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int PORT
public static final int REUSE_OPEN_PORT
public static final int LIMIT_CONNECTIONS_TO_LOCALHOST
public static final int MSSLEEPBETWEENSERVERUPDATES
public static final int MESSAGEQUEUESIZEINBYTES
public static final int MAXNBMESSAGESPERUPDATE
public static final int _MALLOC
public static final int REALLOC
public static final int _FREE
public static final int MM_CONTEXT
public static final int INPUT_HANDLER
public static final int INPUT_HANDLER_CONTEXT
public static final int LOGFILENAME
public RMTSettings(java.nio.ByteBuffer container)
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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic short port()
port field.public int reuse_open_port()
reuse_open_port field.public int limit_connections_to_localhost()
limit_connections_to_localhost field.public int msSleepBetweenServerUpdates()
msSleepBetweenServerUpdates field.public int messageQueueSizeInBytes()
messageQueueSizeInBytes field.public int maxNbMessagesPerUpdate()
maxNbMessagesPerUpdate field.public RMTMalloc _malloc()
_malloc field.public RMTRealloc realloc()
realloc field.public RMTFree _free()
_free field.public long mm_context()
mm_context field.public RMTInputHandler input_handler()
input_handler field.public long input_handler_context()
input_handler_context field.public java.nio.ByteBuffer logFilename()
ByteBuffer view of the null-terminated string pointed to by the logFilename field.public java.lang.String logFilenameString()
logFilename field.public RMTSettings port(short value)
port field.public RMTSettings reuse_open_port(int value)
reuse_open_port field.public RMTSettings limit_connections_to_localhost(int value)
limit_connections_to_localhost field.public RMTSettings msSleepBetweenServerUpdates(int value)
msSleepBetweenServerUpdates field.public RMTSettings messageQueueSizeInBytes(int value)
messageQueueSizeInBytes field.public RMTSettings maxNbMessagesPerUpdate(int value)
maxNbMessagesPerUpdate field.public RMTSettings _malloc(RMTMallocI value)
_malloc field.public RMTSettings realloc(RMTReallocI value)
realloc field.public RMTSettings _free(RMTFreeI value)
_free field.public RMTSettings mm_context(long value)
mm_context field.public RMTSettings input_handler(RMTInputHandlerI value)
input_handler field.public RMTSettings input_handler_context(long value)
input_handler_context field.public RMTSettings logFilename(java.nio.ByteBuffer value)
logFilename field.public RMTSettings set(short port, int reuse_open_port, int limit_connections_to_localhost, 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 logFilename)
public RMTSettings set(RMTSettings src)
src - the source structpublic static RMTSettings malloc()
RMTSettings instance allocated with memAlloc. The instance must be explicitly freed.public static RMTSettings calloc()
RMTSettings instance allocated with memCalloc. The instance must be explicitly freed.public static RMTSettings create()
RMTSettings instance allocated with BufferUtils.public static RMTSettings create(long address)
RMTSettings instance for the specified memory address.@Nullable public static RMTSettings createSafe(long address)
public static RMTSettings mallocStack()
RMTSettings instance allocated on the thread-local MemoryStack.public static RMTSettings callocStack()
RMTSettings instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static RMTSettings mallocStack(org.lwjgl.system.MemoryStack stack)
RMTSettings instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static RMTSettings callocStack(org.lwjgl.system.MemoryStack stack)
RMTSettings instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static short nport(long struct)
port().public static int nreuse_open_port(long struct)
reuse_open_port().public static int nlimit_connections_to_localhost(long struct)
limit_connections_to_localhost().public static int nmsSleepBetweenServerUpdates(long struct)
msSleepBetweenServerUpdates().public static int nmessageQueueSizeInBytes(long struct)
messageQueueSizeInBytes().public static int nmaxNbMessagesPerUpdate(long struct)
maxNbMessagesPerUpdate().public static RMTRealloc nrealloc(long struct)
realloc().public static long nmm_context(long struct)
mm_context().public static RMTInputHandler ninput_handler(long struct)
input_handler().public static long ninput_handler_context(long struct)
input_handler_context().public static java.nio.ByteBuffer nlogFilename(long struct)
logFilename().public static java.lang.String nlogFilenameString(long struct)
logFilenameString().public static void nport(long struct,
short value)
port.public static void nreuse_open_port(long struct,
int value)
reuse_open_port.public static void nlimit_connections_to_localhost(long struct,
int value)
limit_connections_to_localhost.public static void nmsSleepBetweenServerUpdates(long struct,
int value)
msSleepBetweenServerUpdates.public static void nmessageQueueSizeInBytes(long struct,
int value)
messageQueueSizeInBytes.public static void nmaxNbMessagesPerUpdate(long struct,
int value)
maxNbMessagesPerUpdate.public static void n_malloc(long struct,
RMTMallocI value)
_malloc.public static void nrealloc(long struct,
RMTReallocI value)
realloc.public static void nmm_context(long struct,
long value)
mm_context.public static void ninput_handler(long struct,
RMTInputHandlerI value)
input_handler.public static void ninput_handler_context(long struct,
long value)
input_handler_context.public static void nlogFilename(long struct,
java.nio.ByteBuffer value)
logFilename.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.