SynConnection

Documentation of Synapse Z SynConnection class

FieldTypeDescription
Functionfunction/userdatareturns the connection function (returns internal address for c connections)
Threadthreadreturns the connection thread (doesnt exist for c connections)
Objectuserdatareturns the internal c object (doesnt exist for lua connections)
ForeignThreadboolwhenever the connection was connected by a game/core thread
LuaConnectionboolwhenever the connection is lua or not
Enabledboolwhenever the connection is enabled or not
Disabledboolwhenever the connection is disabled or not

SynConnection:Enable

void SynConnection:Enable()

enables the connection if was disabled previously

NOTE: ignored for core connections

SynConnection:Disable

void SynConnection:Disable()

disables the connection

NOTE: ignored for core connections

SynConnection:Fire

void SynConnection:Fire()

fires the connection with the specified arguments

NOTE: ignored for c/core connections

SynConnection:Spawn

void SynConnection:Spawn()

spawns the connection with the specified arguments

NOTE: ignored for c/core connections

SynConnection:Defer

void SynConnection:Defer()

defers the connection with the specified arguments

NOTE: ignored for c/core connections

SynConnection:Hook

function SynConnection:Hook(hook: function)

hooks the connection function and returns the original

NOTE: ignored for c/core connections