import{_ as s,c as i,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Client","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/client.md","filePath":"api/1.0/client.md"}'),t={name:"api/1.0/client.md"},l=e(`

Client

For Client-sided

.Client

Create new Warp event.

lua
(
	Identifier: string
)
lua
local Remote = Warp.new("Remote")

:Connect

Connect event to receive incoming from server way.

lua
(
	callback: (...any) -> ()
)
lua
Remote:Connect(function(...)
	print(...)
end)

:Once

This function likely :Connect but it disconnect the event once it fired.

lua
(
	callback: (...any) -> ()
)
lua
Remote:Once(function(...)
	print(...)
end)

:Disconnect

Disconnect the event connection.

lua
(
	key: string
)
lua
local connection = Remote:Connect(function(player, ...) end) -- store the key

Remote:Disconnect(connection)

:DisconnectAll

Disconnect All the event connection.

lua
Remote:DisconnectAll()

:Fire

Fire the event to the spesific server with data.

lua
(
	reliable: boolean,
	...: any
)
lua
Remote:Fire(true, "Hello World!")

WARNING

This function have rate limiting it self and configured from server.

:Invoke

Semiliar to :InvokeServer, its for Invoke to a server.

lua
(
	timeout: number,
	...: any
) -> (...any)
lua
local Request = Remote:Invoke(2, "Hello World!")

WARNING

This function is yielded, once it timeout it will return nil.

:Wait

Wait the event being triggered.

lua
Remote:Wait()

WARNING

This function is yielded, Invoke might also ping this one and also causing error.

:Destroy

Disconnect all connection of event and remove the event from Warp

lua
Remote:Destroy()
`,32),n=[l];function p(h,k,d,c,o,r){return a(),i("div",null,n)}const u=s(t,[["render",p]]);export{g as __pageData,u as default};