mirror of
https://github.com/imezx/Warp.git
synced 2026-03-18 00:44:16 +00:00
chore(docs): update server.md
This commit is contained in:
parent
211900d874
commit
8ceb5257ba
1 changed files with 25 additions and 0 deletions
|
|
@ -8,6 +8,31 @@ For Server-sided operations.
|
||||||
local Server = Warp.Server()
|
local Server = Warp.Server()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `.reg_namespaces`
|
||||||
|
|
||||||
|
Register namespaces to ensure all of the namespaces is earlier being registered on the server to prevent any unexpected issues on the client.
|
||||||
|
but this is optional, you may have to use this if you had a problem with identifier namespace on client.
|
||||||
|
|
||||||
|
::: code-group
|
||||||
|
```luau [Variable]
|
||||||
|
(
|
||||||
|
namespaces: { string },
|
||||||
|
) -> Connection
|
||||||
|
```
|
||||||
|
|
||||||
|
```luau [Example]
|
||||||
|
Server.reg_namespaces({
|
||||||
|
"ServerNotify",
|
||||||
|
"ServerMessage",
|
||||||
|
"WelcomeMessage",
|
||||||
|
"Broadcast",
|
||||||
|
"DataReplication",
|
||||||
|
"RequestData",
|
||||||
|
"Update"
|
||||||
|
})
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
## `.Connect`
|
## `.Connect`
|
||||||
|
|
||||||
Connect to an event to receive incoming data from clients.
|
Connect to an event to receive incoming data from clients.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue