Skip to main content

Syncee

Listed API is shared between server and client. For server / client specific API, check their documentation.

Properties

buffer

Syncee.buffer: typeof(buffer)

Wrapper table for the buffer library that automatically handles replication for buffers on the server
It exists for convenience. Using ReplicateBufferRegion is better as it lets you define the region to replicate rather than doing it per-write.

Functions

RegisterSchema

Syncee.RegisterSchema(
namestring,
serdesSquish.SerDes<table>
) → number?

Registers a table schema for use in serializing replicated tables and returns the id of the schema. Same schemas should be registered on both server and client. Schemas are identified by name so order doesn't matter.

GetSchemaId

Syncee.GetSchemaId(namestring) → number?

Returns id of the schema for use in SetSchema().

GetData

Syncee.GetData(playerPlayer?) → table?

Returns the root replication table of the provided player.
On client, only returns that of the localplayer.

GetValueWithId

Syncee.GetValueWithId(idnumber) → (table | buffer)?

Returns the table or buffer associated with the provided id if present.

GetIdOfValue

Syncee.GetIdOfValue(ttable | buffer) → number?

Returns id associated with the table or buffer if present.

IsReplicatedValue

Syncee.IsReplicatedValue(ttable | buffer) → boolean

Returns boolean indicating if the table or buffer is replicated.

GetTableChangedSignal

Syncee.GetTableChangedSignal(ttable) → any--

This is properly typed in the package.

Returns signal that fires whenever any key of the replicated table changes.

GetBufferChangedSignal

Syncee.GetBufferChangedSignal(bbuffer) → any--

This is properly typed in the package.

Returns signal that fires whenever the content of the buffer changes.

WaitForValue

Syncee.WaitForValue(
ttable,
keyany,
timeoutnumber?
) → any

Waits until 'key' of the provided table is not nil, then returns the value.

Show raw api
{
    "functions": [
        {
            "name": "RegisterSchema",
            "desc": "Registers a table schema for use in serializing replicated tables and returns the id of the schema.\nSame schemas should be registered on both server and client. Schemas are identified by name so order doesn't matter.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "serdes",
                    "desc": "",
                    "lua_type": "Squish.SerDes<table>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 17,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetSchemaId",
            "desc": "Returns id of the schema for use in SetSchema().",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 23,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetData",
            "desc": "Returns the root replication table of the provided player.\\\nOn client, only returns that of the localplayer.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "table?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 30,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetValueWithId",
            "desc": "Returns the table or buffer associated with the provided id if present.",
            "params": [
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "(table | buffer)?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 36,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetIdOfValue",
            "desc": "Returns id associated with the table or buffer if present.",
            "params": [
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "table | buffer"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 42,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "IsReplicatedValue",
            "desc": "Returns boolean indicating if the table or buffer is replicated.",
            "params": [
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "table | buffer"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 48,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetTableChangedSignal",
            "desc": "Returns signal that fires whenever any key of the replicated table changes.",
            "params": [
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "This is properly typed in the package.",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 54,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "GetBufferChangedSignal",
            "desc": "Returns signal that fires whenever the content of the buffer changes.",
            "params": [
                {
                    "name": "b",
                    "desc": "",
                    "lua_type": "buffer"
                }
            ],
            "returns": [
                {
                    "desc": "This is properly typed in the package.",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 60,
                "path": "docs_luau/moonwave.luau"
            }
        },
        {
            "name": "WaitForValue",
            "desc": "Waits until 'key' of the provided table is not nil, then returns the value.",
            "params": [
                {
                    "name": "t",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "timeout",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 68,
                "path": "docs_luau/moonwave.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "buffer",
            "desc": "Wrapper table for the `buffer` library that automatically handles replication for buffers on the server\\\nIt exists for convenience. Using [`ReplicateBufferRegion`](../api/server#ReplicateBufferRegion) is better as it lets you define the region to replicate rather than doing it per-write.",
            "lua_type": "typeof(buffer)",
            "source": {
                "line": 73,
                "path": "docs_luau/moonwave.luau"
            }
        }
    ],
    "types": [],
    "name": "Syncee",
    "desc": "Listed API is shared between server and client. For server / client specific API, check their documentation.",
    "source": {
        "line": 3,
        "path": "docs_luau/moonwave.luau"
    }
}