MCPcopy Create free account

hub / github.com/TurboWarp/cloud-server / functions

Functions58 in github.com/TurboWarp/cloud-server

↓ 29 callersMethodhas
* Determine whether this room has a variable of a given name. * @param {string} name The name of the variable
src/Room.js:157
↓ 24 callersMethodcreate
* Create a new variable. * This method does not inform clients of the change. * @param {string} name The name of the variable * @param {strin
src/Room.js:103
↓ 13 callersMethodgetClients
* Get all connected clients. * @returns {Client[]} All connected clients.
src/Room.js:84
↓ 12 callersMethodget
* Get a variable. * @param {string} name The name of the variable * @returns {Value} Variable value. * @throws Will throw if the variable doe
src/Room.js:145
↓ 12 callersMethodlog
* Log a message including some metadata about this client. * @param {string} message
src/Client.js:67
↓ 10 callersMethodset
* Set an existing variable to a new value. * This method does not inform clients of the change. * @param {string} name The name of the variable
src/Room.js:120
↓ 8 callersMethodaddClient
* Add a new client. * @param {Client} client The client to add * @throws Will throw if client is already added, or there are too many clients co
src/Room.js:56
↓ 7 callersFunctionnaughty
* Determine whether a given string of text is probably safe for most audiences. * Note that this is not foolproof. * @param {string} text The text t
src/naughty.js:65
↓ 6 callersMethodclose
* Close the connection to this client with a given error code and remove from connected room. * @param {number} code The error code to send
src/Client.js:107
↓ 6 callersMethoddelete
* Delete a variable. * @param {string} name The name of the variable * @throws Will throw if the variable does not exist.
src/Room.js:132
↓ 6 callersMethodremoveClient
* Remove a client. * @param {Client} client The client to remove * @throws Will throw if the client is not part of this room.
src/Room.js:71
↓ 6 callersMethodsend
* Send a message to the client. * @param {import('ws').Data} data The data to send.
src/Client.js:91
↓ 5 callersMethodremove
* Remove a Room * @param {RoomID} id The ID of the Room * @throws Will throw if the room does not exist, or if the room has clients connected.
src/RoomList.js:87
↓ 3 callersMethoderror
* Log an error message including some metadata about this client. * @param {string} message
src/Client.js:83
↓ 3 callersMethodgetAllVariables
* Get a map of all variables. * @returns {Map<string, Value>} All variables, and their value.
src/Room.js:92
↓ 3 callersMethodupdateLogPrefix
* Update the log prefix of this client. * @private
src/Client.js:52
↓ 2 callersFunctioncreateSetMessage
* Create a "set" message to send to clients to set a variable. * @param {string} name The name of the variable. * @param {string|number} value The v
src/server.js:56
↓ 2 callersFunctionperformSet
(variable, value)
src/server.js:172
↓ 2 callersMethodsetRoom
* Set the room that this client connects to and join it. * @param {Room} room * @throws Will throw if the client is already in a room.
src/Client.js:125
↓ 2 callersFunctionsetVariable
(name, value)
doc/node-client.js:34
↓ 2 callersMethodtimedOut
* @param {string} reason Reason for time out, included in logs.
src/Client.js:156
↓ 1 callersMethoddestroy
* Delete this RoomList. * Stops the janitor timer, if it is started.
src/RoomList.js:131
↓ 1 callersMethodget
* Get a Room * @param {RoomID} id * @returns {Room} * @throws Will throw if room does not exist
src/RoomList.js:51
↓ 1 callersFunctiongetForwardedFor
* Extract the value of the x-forwarded-for header. * @param {import('http').IncomingHttpHeaders} headers The request headers. * @returns {?string} T
src/address.js:8
↓ 1 callersMethodhandleConnect
* Handle a connection from a client. * @param {Client} client The Client connecting.
src/ConnectionManager.js:53
↓ 1 callersMethodhandleDisconnect
* Handle a disconnection from a client. * @param {Client} client The Client disconnecting.
src/ConnectionManager.js:61
↓ 1 callersMethodhandlePong
* Handle a pong from a client. * @param {Client} client The WebSocket server the pong is from
src/ConnectionManager.js:69
↓ 1 callersMethodhas
* Whether a Room exists in this list * @param {RoomID} id * @returns {boolean} Whether the room exists
src/RoomList.js:41
↓ 1 callersFunctionisFilterList
* Return whether a file should be read as a filter list. * @param {string} fileName The name of the file.
src/naughty.js:42
↓ 1 callersFunctionisGenerated
* Determine if a username is randomly generated or not. * @param {string} username The username to test. * @returns {boolean} true if the username w
src/username.js:22
↓ 1 callersFunctionisValidMessage
* @param {unknown} data * @returns {boolean}
src/server.js:32
↓ 1 callersFunctionloadFilter
* Load a filter. * @param {string} name The name of the filter. * @param {string} contents The contents of the filter.
src/naughty.js:28
↓ 1 callersFunctionloadFilters
* Load all filters from the filters directory.
src/naughty.js:49
↓ 1 callersFunctionparseMessage
* Parse WebSocket message data. * @param {string} data Message data * @returns {object}
src/server.js:42
↓ 1 callersFunctionparseUsername
* Anonymize a generated username, or return it unmodified * @param {string} username The username * @returns {string} Anonymized username or origina
src/username.js:10
↓ 1 callersFunctionperformCreate
(variable, value)
src/server.js:141
↓ 1 callersFunctionperformDelete
(variable)
src/server.js:145
↓ 1 callersFunctionperformHandshake
(roomId, username)
src/server.js:106
↓ 1 callersFunctionperformRename
(oldName, newName)
src/server.js:155
↓ 1 callersMethodping
* Send a ping message to this Client.
src/Client.js:146
↓ 1 callersFunctionprocessMessage
(data)
src/server.js:199
↓ 1 callersFunctionsendToClient
(client, message)
src/server.js:74
↓ 1 callersMethodsetUsername
* Set the username of this client. * @param {string} username The new username
src/Client.js:138
↓ 1 callersMethodstart
* Start the ConnectionManager's periodic check.
src/ConnectionManager.js:76
↓ 1 callersMethodstartJanitor
* Begin the janitor timer.
src/RoomList.js:123
↓ 1 callersMethodstop
* Stop the ConnectionManager from running.
src/ConnectionManager.js:86
Methodconstructor
* @param {?import('ws')} ws The WebSocket connection * @param {?import('http').IncomingMessage} req The HTTP request
src/Client.js:11
Methodconstructor
()
src/RoomList.js:17
Methodconstructor
()
src/ConnectionManager.js:10
Methodconstructor
* ConnectionError is an error with some special handling from the server. * @param {number} code WebSocket status code. * @param {string} messag
src/ConnectionError.js:7
Methodconstructor
* @param {RoomID} id
src/Room.js:17
Methodcreate
* Create a new Room * @param {RoomID} id The room ID * @returns {Room} A new room * @throws Will throw if there are too many rooms.
src/RoomList.js:65
FunctiongetAddress
* Get the remote IP address of a request. * Follows config values set in config.js. * @param {?import('http').IncomingMessage} req The incoming HTTP
src/address.js:24
FunctiongetVariable
(name)
doc/node-client.js:44
Methodjanitor
* Scan for dormant rooms and remove them. * @private
src/RoomList.js:102
FunctionsendBuffered
()
src/server.js:65
Methodupdate
* @private
src/ConnectionManager.js:25
Methodwarn
* Log a warning message including some metadata about this client. * @param {string} message
src/Client.js:75