-
-
Notifications
You must be signed in to change notification settings - Fork 0
Module: Socket: Network
Аниса edited this page Aug 5, 2022
·
2 revisions
const bool: state = cSocket.createNetwork(
string: name, // Name of the network
bool: isCallback // (Optional) Determines whether the network is a callback network
)
const bool: state = cSocket.destroyNetwork(
string: name
)
const bool: state = cSocket.isNetwork(
string: name
)
const array: result = cSocket.fetchNetworks()
const bool: state = cSocket.on(
string: name,
function: exec
)
const bool: state = cSocket.off(
string: name,
function: exec
)
// Client Syntax:
const bool: state = cSocket.emit(
string: name,
bool: isRemote, // (Optional): If left unspecified, emit will be handled locally
~: ...arguments
)
// Server Syntax:
const bool: state = cSocket.emit(
string: name,
socket: isRemote, // (Optional): If left unspecified, emit will be handled locally
~: ...arguments
)
// Client Syntax:
const ~: result = cSocket.emitCallback(
string: name,
bool: isRemote, // (Optional): If left unspecified, emit will be handled locally
~: ...arguments
)
// Server Syntax:
const ~: result = cSocket.emitCallback(
string: name,
socket: isRemote, // (Optional): If left unspecified, emit will be handled locally
~: ...arguments
)