Network constants

From ENIGMA

Revision as of 15:33, 19 April 2013 by RobertBColton (Talk | contribs)
Jump to: navigation, search

This article is an overview of network and buffer related constants.

Constant Description
network_socket_bluetooth Socket utilizing blue tooth
network_socket_tcp Socket utilizing TCP-IP
network_socket_udp Socket utilizing UDP
Constant Description
buffer_generalerror
buffer_invalidtype
buffer_outofbounds
buffer_outofspace
buffer_seek_end
buffer_seek_relative
buffer_seek_start
buffer_vbuffer
Constant Description
buffer_fast A special "stripped down" buffer that is extremely fast to read/write to. However it can only be used with buffer_u8 and buffer_s8 data types, and must be 1 byte aligned.
buffer_fixed A buffer of a fixed size in bytes. The size is set when the buffer is created and cannot be changed again.
buffer_grow A buffer that will "grow" dynamically as data is added. You create it with an initial size (which should be an approximation of the size of the data expected to be stored), and then it will expand to accept further data that overflows this initial size.
buffer_wrap A buffer where the data will "wrap". When the data being added reaches the limit of the buffer size, the overwrite will be placed back at the start of the buffer, and further writing will continue from that point.
Constant Bytes Data Type Description
buffer_u8 1 byte 8bit unsigned integer. Positive value in the range of 0 to 255
buffer_s8 1 byte 8bit signed integer. Positive or negative value in the range of -128 to 127 (0 is classed as positive)
buffer_u16 2 bytes 16bit unsigned integer. Positive value in the range of 0 to 65,535
buffer_s16 2 bytes 16bit signed integer. Positive or negative value in the range of -32,768 to 32,767 (0 is classed as positive)
buffer_u32 4 bytes 32bit unsigned integer. Positive value in the range of 0 to 4,294,967,295
buffer_s32 4 bytes 32bit signed integer. Positive or negative value in the range of -2,147,483,648 to 2,147,483,647 (0 is classed as positive).
buffer_f16 2 bytes 16bit floating point number. Positive or negative value within the range of a 16 bit signed integer.
buffer_f32 4 bytes 32bit floating point number. Positive or negative value in the range of within the range of a 32 bit signed integer.
buffer_f64 8 bytes 64bit floating point number. Positive or negative value in the range of within the range of -(263) to 263 - 1.
buffer_bool 1 byte boolean value. Can only be either 1 or 0 (true or false)
buffer_string N/A UTF-8 null terminated (0x00) string. Basically a GameMaker string is dumped in the buffer, and a 0 put at the end.
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox