Network constants: Difference between revisions

From ENIGMA
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
This article is an overview of network and buffer related constants.
This article is an overview of network and buffer related constants.


{| class="wikitable" width="100%" cellpadding=5 cellspacing=0 border=0 align=left style="background-color:#FAD796; border: 2px; border-style: solid; border-color:gray;"
{| class="consttab"
|- cellpadding=5 cellspacing=0 border=0 align=left style="background-color:black; color:white;"
|-  
| '''Constant'''  
! '''Constant''' !! '''Description'''
| '''Description'''
|-
|-
|'''network_socket_bluetooth'''
| network_socket_bluetooth || Socket utilizing blue tooth
| Socket utilizing blue tooth
|-
|-
|'''network_socket_tcp'''
| network_socket_tcp || Socket utilizing TCP-IP
| Socket utilizing TCP-IP
|-
|-
|'''network_socket_udp'''
| network_socket_udp || Socket utilizing UDP
| Socket utilizing UDP
|}
|}
{| class="wikitable" width="100%" cellpadding=5 cellspacing=0 border=0 align=left style="background-color:#FAD796; border: 2px; border-style: solid; border-color:gray;"
|- cellpadding=5 cellspacing=0 border=0 align=left style="background-color:black; color:white;"
| '''Constant'''
| '''Description'''
|-
|'''buffer_generalerror'''
|
|-
|'''buffer_invalidtype'''
|
|-
|'''buffer_outofbounds'''
|
|-
|'''buffer_outofspace'''
|
|-
|'''buffer_vbuffer'''
|
|}
{| class="wikitable" width="100%" cellpadding=5 cellspacing=0 border=0 align=left style="background-color:#FAD796; border: 2px; border-style: solid; border-color:gray;"
|- cellpadding=5 cellspacing=0 border=0 align=left style="background-color:black; color:white;"
| '''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.
|}
<center>
{| class="wikitable sortable" width="100%" cellpadding=5 cellspacing=0 border=0 align=left style="background-color:#FAD796; border: 2px; border-style: solid; border-color:gray;"
|- cellpadding=5 cellspacing=0 border=0 align=left style="background-color:black; color:white;"
| '''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 -(2<sup>63</sup>) to 2<sup>63</sup> - 1.
|-
|'''buffer_bool'''
|'''1 byte'''
|boolean value.
|Can only be either 1 or 0 ('''''true''''' or '''''false''''')
|-
|'''buffer_string'''
|'''N/A'''
|[http://en.wikipedia.org/wiki/UTF-8 UTF-8] null terminated (0x00) string.
|Basically a GameMaker string is dumped in the buffer, and a 0 put at the end.
|}
</center>

Latest revision as of 19:39, 17 September 2013

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