initial release 1.0.0

This commit is contained in:
EternityDev 2024-01-05 19:14:38 +07:00
parent ad128ffc7f
commit f9f2f900b2
2433 changed files with 788530 additions and 0 deletions

47
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,47 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- master
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
name: Build & Deploy
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci
- name: Build
run: |
npm run docs:build
touch docs/.vitepress/dist
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2

17
README.md Normal file
View file

@ -0,0 +1,17 @@
# Warp
Generated by [Rojo](https://github.com/rojo-rbx/rojo) 7.4.0-rc3.
## Getting Started
To build the place from scratch, use:
```bash
rojo build -o "Warp.rbxlx"
```
Next, open `Warp.rbxlx` in Roblox Studio and start the Rojo server:
```bash
rojo serve
```
For more help, check out [the Rojo documentation](https://rojo.space/docs).

BIN
Warp.rbxm Normal file

Binary file not shown.

7
aftman.toml Normal file
View file

@ -0,0 +1,7 @@
# This file lists tools managed by Aftman, a cross-platform toolchain manager.
# For more information, see https://github.com/LPGhatguy/aftman
# To add a new tool, add an entry to this table.
[tools]
rojo = "rojo-rbx/rojo@7.2.1"
wally = "UpliftGames/wally@0.3.2"

6
default.project.json Normal file
View file

@ -0,0 +1,6 @@
{
"name": "Warp",
"tree": {
"$path": "src"
}
}

View file

@ -0,0 +1,31 @@
{
"hash": "2742d842",
"configHash": "4a960105",
"lockfileHash": "e5af05f2",
"browserHash": "f4abe41e",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "00d22783",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "fbece760",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "81778500",
"needsInterop": false
}
},
"chunks": {
"chunk-TL4KESHX": {
"file": "chunk-TL4KESHX.js"
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,3 @@
{
"type": "module"
}

View file

@ -0,0 +1,162 @@
// node_modules/@vue/devtools-api/lib/esm/env.js
function getDevtoolsGlobalHook() {
return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function getTarget() {
return typeof navigator !== "undefined" && typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
}
var isProxyAvailable = typeof Proxy === "function";
// node_modules/@vue/devtools-api/lib/esm/const.js
var HOOK_SETUP = "devtools-plugin:setup";
var HOOK_PLUGIN_SETTINGS_SET = "plugin:settings:set";
// node_modules/@vue/devtools-api/lib/esm/time.js
var supported;
var perf;
function isPerformanceSupported() {
var _a;
if (supported !== void 0) {
return supported;
}
if (typeof window !== "undefined" && window.performance) {
supported = true;
perf = window.performance;
} else if (typeof global !== "undefined" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
supported = true;
perf = global.perf_hooks.performance;
} else {
supported = false;
}
return supported;
}
function now() {
return isPerformanceSupported() ? perf.now() : Date.now();
}
// node_modules/@vue/devtools-api/lib/esm/proxy.js
var ApiProxy = class {
constructor(plugin, hook) {
this.target = null;
this.targetQueue = [];
this.onQueue = [];
this.plugin = plugin;
this.hook = hook;
const defaultSettings = {};
if (plugin.settings) {
for (const id in plugin.settings) {
const item = plugin.settings[id];
defaultSettings[id] = item.defaultValue;
}
}
const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
let currentSettings = Object.assign({}, defaultSettings);
try {
const raw = localStorage.getItem(localSettingsSaveId);
const data = JSON.parse(raw);
Object.assign(currentSettings, data);
} catch (e) {
}
this.fallbacks = {
getSettings() {
return currentSettings;
},
setSettings(value) {
try {
localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
} catch (e) {
}
currentSettings = value;
},
now() {
return now();
}
};
if (hook) {
hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
if (pluginId === this.plugin.id) {
this.fallbacks.setSettings(value);
}
});
}
this.proxiedOn = new Proxy({}, {
get: (_target, prop) => {
if (this.target) {
return this.target.on[prop];
} else {
return (...args) => {
this.onQueue.push({
method: prop,
args
});
};
}
}
});
this.proxiedTarget = new Proxy({}, {
get: (_target, prop) => {
if (this.target) {
return this.target[prop];
} else if (prop === "on") {
return this.proxiedOn;
} else if (Object.keys(this.fallbacks).includes(prop)) {
return (...args) => {
this.targetQueue.push({
method: prop,
args,
resolve: () => {
}
});
return this.fallbacks[prop](...args);
};
} else {
return (...args) => {
return new Promise((resolve) => {
this.targetQueue.push({
method: prop,
args,
resolve
});
});
};
}
}
});
}
async setRealTarget(target) {
this.target = target;
for (const item of this.onQueue) {
this.target.on[item.method](...item.args);
}
for (const item of this.targetQueue) {
item.resolve(await this.target[item.method](...item.args));
}
}
};
// node_modules/@vue/devtools-api/lib/esm/index.js
function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
const descriptor = pluginDescriptor;
const target = getTarget();
const hook = getDevtoolsGlobalHook();
const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;
if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);
} else {
const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;
const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
list.push({
pluginDescriptor: descriptor,
setupFn,
proxy
});
if (proxy)
setupFn(proxy.proxiedTarget);
}
}
export {
isPerformanceSupported,
now,
setupDevtoolsPlugin
};
//# sourceMappingURL=vitepress___@vue_devtools-api.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

323
docs/.vitepress/cache/deps/vue.js vendored Normal file
View file

@ -0,0 +1,323 @@
import {
BaseTransition,
BaseTransitionPropsValidators,
Comment,
DeprecationTypes,
EffectScope,
ErrorCodes,
ErrorTypeStrings,
Fragment,
KeepAlive,
ReactiveEffect,
Static,
Suspense,
Teleport,
Text,
TrackOpTypes,
Transition,
TransitionGroup,
TriggerOpTypes,
VueElement,
assertNumber,
callWithAsyncErrorHandling,
callWithErrorHandling,
camelize,
capitalize,
cloneVNode,
compatUtils,
compile,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createHydrationRenderer,
createPropsRestProxy,
createRenderer,
createSSRApp,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
customRef,
defineAsyncComponent,
defineComponent,
defineCustomElement,
defineEmits,
defineExpose,
defineModel,
defineOptions,
defineProps,
defineSSRCustomElement,
defineSlots,
devtools,
effect,
effectScope,
getCurrentInstance,
getCurrentScope,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
initCustomFormatter,
initDirectivesForSSR,
inject,
isMemoSame,
isProxy,
isReactive,
isReadonly,
isRef,
isRuntimeOnly,
isShallow,
isVNode,
markRaw,
mergeDefaults,
mergeModels,
mergeProps,
nextTick,
normalizeClass,
normalizeProps,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onBeforeUpdate,
onDeactivated,
onErrorCaptured,
onMounted,
onRenderTracked,
onRenderTriggered,
onScopeDispose,
onServerPrefetch,
onUnmounted,
onUpdated,
openBlock,
popScopeId,
provide,
proxyRefs,
pushScopeId,
queuePostFlushCb,
reactive,
readonly,
ref,
registerRuntimeCompiler,
render,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
resolveFilter,
resolveTransitionHooks,
setBlockTracking,
setDevtoolsHook,
setTransitionHooks,
shallowReactive,
shallowReadonly,
shallowRef,
ssrContextKey,
ssrUtils,
stop,
toDisplayString,
toHandlerKey,
toHandlers,
toRaw,
toRef,
toRefs,
toValue,
transformVNodeArgs,
triggerRef,
unref,
useAttrs,
useCssModule,
useCssVars,
useModel,
useSSRContext,
useSlots,
useTransitionState,
vModelCheckbox,
vModelDynamic,
vModelRadio,
vModelSelect,
vModelText,
vShow,
version,
warn,
watch,
watchEffect,
watchPostEffect,
watchSyncEffect,
withAsyncContext,
withCtx,
withDefaults,
withDirectives,
withKeys,
withMemo,
withModifiers,
withScopeId
} from "./chunk-TL4KESHX.js";
export {
BaseTransition,
BaseTransitionPropsValidators,
Comment,
DeprecationTypes,
EffectScope,
ErrorCodes,
ErrorTypeStrings,
Fragment,
KeepAlive,
ReactiveEffect,
Static,
Suspense,
Teleport,
Text,
TrackOpTypes,
Transition,
TransitionGroup,
TriggerOpTypes,
VueElement,
assertNumber,
callWithAsyncErrorHandling,
callWithErrorHandling,
camelize,
capitalize,
cloneVNode,
compatUtils,
compile,
computed,
createApp,
createBlock,
createCommentVNode,
createElementBlock,
createBaseVNode as createElementVNode,
createHydrationRenderer,
createPropsRestProxy,
createRenderer,
createSSRApp,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
customRef,
defineAsyncComponent,
defineComponent,
defineCustomElement,
defineEmits,
defineExpose,
defineModel,
defineOptions,
defineProps,
defineSSRCustomElement,
defineSlots,
devtools,
effect,
effectScope,
getCurrentInstance,
getCurrentScope,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
initCustomFormatter,
initDirectivesForSSR,
inject,
isMemoSame,
isProxy,
isReactive,
isReadonly,
isRef,
isRuntimeOnly,
isShallow,
isVNode,
markRaw,
mergeDefaults,
mergeModels,
mergeProps,
nextTick,
normalizeClass,
normalizeProps,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onBeforeUpdate,
onDeactivated,
onErrorCaptured,
onMounted,
onRenderTracked,
onRenderTriggered,
onScopeDispose,
onServerPrefetch,
onUnmounted,
onUpdated,
openBlock,
popScopeId,
provide,
proxyRefs,
pushScopeId,
queuePostFlushCb,
reactive,
readonly,
ref,
registerRuntimeCompiler,
render,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
resolveFilter,
resolveTransitionHooks,
setBlockTracking,
setDevtoolsHook,
setTransitionHooks,
shallowReactive,
shallowReadonly,
shallowRef,
ssrContextKey,
ssrUtils,
stop,
toDisplayString,
toHandlerKey,
toHandlers,
toRaw,
toRef,
toRefs,
toValue,
transformVNodeArgs,
triggerRef,
unref,
useAttrs,
useCssModule,
useCssVars,
useModel,
useSSRContext,
useSlots,
useTransitionState,
vModelCheckbox,
vModelDynamic,
vModelRadio,
vModelSelect,
vModelText,
vShow,
version,
warn,
watch,
watchEffect,
watchPostEffect,
watchSyncEffect,
withAsyncContext,
withCtx,
withDefaults,
withDirectives,
withKeys,
withMemo,
withModifiers,
withScopeId
};
//# sourceMappingURL=vue.js.map

7
docs/.vitepress/cache/deps/vue.js.map vendored Normal file
View file

@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

View file

@ -0,0 +1,64 @@
import { defineConfig } from 'vitepress'
function nav() {
return [
{
text: 'Guide',
link: '/guide/',
},
{
text: 'API Reference',
items: [
{ text: '1.0', link: '/api/1.0/warp' }
]
}
]
}
function side() {
return {
'/api/1.0': [
{
text: 'API Reference',
items: [
{ text: 'Warp', link: '/api/1.0/warp' },
{ text: 'Server', link: '/api/1.0/server' },
{ text: 'Client', link: '/api/1.0/client' },
{ text: 'RateLimit', link: '/api/1.0/ratelimit' },
]
}
],
'/guide/': [
{
text: 'Guide',
items: [
{ text: 'Overview', link: '/guide/' },
{ text: 'Installation', link: '/guide/installation' },
{ text: 'Getting Started', link: '/guide/getting-started' },
{ text: 'Example', link: '/guide/example' },
]
},
]
}
}
export default defineConfig({
title: "Warp",
description: "Warp - A very-fast & powerful network library for Roblox.",
lang: 'en-US',
head: [
['link', { rel: 'icon', href: 'favicon.ico' }],
],
base: "/Warp",
assetsDir: '/assets',
cleanUrls: true,
themeConfig: {
logo: '/icon.ico',
nav: nav(),
sidebar: side(),
socialLinks: [
{ icon: 'github', link: 'https://github.com/imezx/Warp' },
{ icon: 'discord', link: 'https://discord.gg/qnSfEZ6bZK' },
]
}
})

22
docs/.vitepress/dist/404.html vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

27
docs/.vitepress/dist/api/1.0/warp.html vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,21 @@
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(`<h1 id="client" tabindex="-1">Client <a class="header-anchor" href="#client" aria-label="Permalink to &quot;Client&quot;"></a></h1><p>For Client-sided</p><h2 id="client-1" tabindex="-1"><code>.Client</code> <a class="header-anchor" href="#client-1" aria-label="Permalink to &quot;\`.Client\`&quot;"></a></h2><p>Create new Warp event.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-WMTa-" id="tab-8fuJBYo" checked="checked"><label for="tab-8fuJBYo">Variable</label><input type="radio" name="group-WMTa-" id="tab-l7wfSlv"><label for="tab-l7wfSlv">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Identifier</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="connect" tabindex="-1"><code>:Connect</code> <a class="header-anchor" href="#connect" aria-label="Permalink to &quot;\`:Connect\`&quot;"></a></h2><p>Connect event to receive incoming from server way.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-913OR" id="tab-Xvghcm2" checked="checked"><label for="tab-Xvghcm2">Variable</label><input type="radio" name="group-913OR" id="tab-Qq0qRYq"><label for="tab-Qq0qRYq">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="once" tabindex="-1"><code>:Once</code> <a class="header-anchor" href="#once" aria-label="Permalink to &quot;\`:Once\`&quot;"></a></h2><p>This function likely <code>:Connect</code> but it disconnect the event once it fired.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-7bWhj" id="tab-qg9rt4C" checked="checked"><label for="tab-qg9rt4C">Variable</label><input type="radio" name="group-7bWhj" id="tab-wCFNoJJ"><label for="tab-wCFNoJJ">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Once</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event connection.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-jhZf-" id="tab-jQIB7cH" checked="checked"><label for="tab-jQIB7cH">Variable</label><input type="radio" name="group-jhZf-" id="tab-f1J_ZR8"><label for="tab-f1J_ZR8">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- store the key</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection)</span></span></code></pre></div></div></div><h2 id="disconnectall" tabindex="-1"><code>:DisconnectAll</code> <a class="header-anchor" href="#disconnectall" aria-label="Permalink to &quot;\`:DisconnectAll\`&quot;"></a></h2><p>Disconnect All the event connection.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to the spesific server with data.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-_QDeh" id="tab-7pHqPfD" checked="checked"><label for="tab-7pHqPfD">Variable</label><input type="radio" name="group-_QDeh" id="tab-iNQzgEZ"><label for="tab-iNQzgEZ">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function have rate limiting it self and configured from server.</p></div><h2 id="invoke" tabindex="-1"><code>:Invoke</code> <a class="header-anchor" href="#invoke" aria-label="Permalink to &quot;\`:Invoke\`&quot;"></a></h2><p>Semiliar to <code>:InvokeServer</code>, its for Invoke to a server.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-OUXOZ" id="tab-3ch63Il" checked="checked"><label for="tab-3ch63Il">Variable</label><input type="radio" name="group-OUXOZ" id="tab-T2WBB5b"><label for="tab-T2WBB5b">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> timeout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Request </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, once it timeout it will return nil.</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event being triggered.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, Invoke might also ping this one and also causing error.</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect all connection of event and remove the event from Warp</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div>`,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};

View file

@ -0,0 +1 @@
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("",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};

View file

@ -0,0 +1,10 @@
import{_ as i,c as s,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Rate Limit","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/ratelimit.md","filePath":"api/1.0/ratelimit.md"}'),t={name:"api/1.0/ratelimit.md"},n=e(`<h1 id="rate-limit" tabindex="-1">Rate Limit <a class="header-anchor" href="#rate-limit" aria-label="Permalink to &quot;Rate Limit&quot;"></a></h1><p>Ratelimit is one of most useful feature.</p><p>( Configured on Server and For Client )</p><h2 id="setup" tabindex="-1"><code>Setup</code> <a class="header-anchor" href="#setup" aria-label="Permalink to &quot;\`Setup\`&quot;"></a></h2><p>When creating a event on Server, you can add second argument as table <code>rateLimit</code> to limit the number of times the event can be called and the interval for reset the counter.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-8_4-Q" id="tab-2KM4Z7r" checked="checked"><label for="tab-2KM4Z7r">Server</label><input type="radio" name="group-8_4-Q" id="tab-rBfnYwa"><label for="tab-rBfnYwa">Client</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Server</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Let&#39;s make the event have ratelimit with max 50 entrance for 2 seconds.</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> maxEntrance </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 50</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- maximum 50 fires.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> interval </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- 2 seconds</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">})</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Now the Event RateLimit is configured, and ready to use.</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- No need anything to adds on client side.</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Client</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- The Event will automatic it self for retreiving the rate limit configuration from the server.</span></span></code></pre></div></div></div>`,6),l=[n];function h(p,r,k,d,o,c){return a(),s("div",null,l)}const m=i(t,[["render",h]]);export{g as __pageData,m as default};

View file

@ -0,0 +1 @@
import{_ as i,c as s,o as a,U as e}from"./chunks/framework.BouBWMxc.js";const g=JSON.parse('{"title":"Rate Limit","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/ratelimit.md","filePath":"api/1.0/ratelimit.md"}'),t={name:"api/1.0/ratelimit.md"},n=e("",6),l=[n];function h(p,r,k,d,o,c){return a(),s("div",null,l)}const m=i(t,[["render",h]]);export{g as __pageData,m as default};

View file

@ -0,0 +1,32 @@
import{_ as t,D as n,c as l,m as s,a as i,I as p,U as a,o as h}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),k={name:"api/1.0/server.md"},d=a(`<h1 id="server" tabindex="-1">Server <a class="header-anchor" href="#server" aria-label="Permalink to &quot;Server&quot;"></a></h1><p>For Server-sided</p><h2 id="server-1" tabindex="-1"><code>.Server</code> <a class="header-anchor" href="#server-1" aria-label="Permalink to &quot;\`.Server\`&quot;"></a></h2><p>Create new Warp event.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-57xOi" id="tab-NGm3bwT" checked="checked"><label for="tab-NGm3bwT">Variable</label><input type="radio" name="group-57xOi" id="tab-xJTaSRi"><label for="tab-xJTaSRi">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Identifier</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> rateLimit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> maxEntrance</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> interval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }?</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">new</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Remote&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="connect" tabindex="-1"><code>:Connect</code> <a class="header-anchor" href="#connect" aria-label="Permalink to &quot;\`:Connect\`&quot;"></a></h2><p>Connect event to receive incoming from client way.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-8yT3f" id="tab-2m4jbXs" checked="checked"><label for="tab-2m4jbXs">Variable</label><input type="radio" name="group-8yT3f" id="tab-jjbAh0p"><label for="tab-jjbAh0p">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">): string</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="once" tabindex="-1"><code>:Once</code> <a class="header-anchor" href="#once" aria-label="Permalink to &quot;\`:Once\`&quot;"></a></h2><p>This function likely <code>:Connect</code> but it disconnect the event once it fired.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-0FKPj" id="tab-zbCqE2v" checked="checked"><label for="tab-zbCqE2v">Variable</label><input type="radio" name="group-0FKPj" id="tab-HOwRQsL"><label for="tab-HOwRQsL">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> callback</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Once</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event connection.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-Xa8q7" id="tab-TtFdp-Z" checked="checked"><label for="tab-TtFdp-Z">Variable</label><input type="radio" name="group-Xa8q7" id="tab-4XTxKsz"><label for="tab-4XTxKsz">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> key</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: string</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ...) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- store the key</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection)</span></span></code></pre></div></div></div><h2 id="disconnectall" tabindex="-1"><code>:DisconnectAll</code> <a class="header-anchor" href="#disconnectall" aria-label="Permalink to &quot;\`:DisconnectAll\`&quot;"></a></h2><p>Disconnect All the event connection.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to a client.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-q2G3p" id="tab-QUgoIAc" checked="checked"><label for="tab-QUgoIAc">Variable</label><input type="radio" name="group-q2G3p" id="tab-SU77jnw"><label for="tab-SU77jnw">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div>`,20),r={id:"fires",tabindex:"-1"},o=s("code",null,":Fires",-1),c=s("a",{class:"header-anchor",href:"#fires","aria-label":'Permalink to "`:Fires` <Badge type="tip" text="Server Only" />"'},"",-1),E=a(`<p>Fire the event to all clients.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-54vBg" id="tab-uI0eydK" checked="checked"><label for="tab-uI0eydK">Variable</label><input type="radio" name="group-54vBg" id="tab-JmoxgRU"><label for="tab-JmoxgRU">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> reliable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><h2 id="invoke" tabindex="-1"><code>:Invoke</code> <a class="header-anchor" href="#invoke" aria-label="Permalink to &quot;\`:Invoke\`&quot;"></a></h2><p>Semiliar to <code>:InvokeClient</code>, its for Invoke to a client.</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-EVFwh" id="tab-80WyNJk" checked="checked"><label for="tab-80WyNJk">Variable</label><input type="radio" name="group-EVFwh" id="tab-SafarTi"><label for="tab-SafarTi">Example</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> timeout</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: number,</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> player</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: any</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Request </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello World!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></div></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, once it timeout it will return nil.</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event being triggered.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, Invoke might also ping this one and also causing error.</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect all connection of event and remove the event from Warp.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span></code></pre></div>`,13);function g(y,u,v,b,F,C){const e=n("Badge");return h(),l("div",null,[d,s("h2",r,[o,i(),p(e,{type:"tip",text:"Server Only"}),i(),c]),E])}const f=t(k,[["render",g]]);export{B as __pageData,f as default};

View file

@ -0,0 +1 @@
import{_ as t,D as n,c as l,m as s,a as i,I as p,U as a,o as h}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),k={name:"api/1.0/server.md"},d=a("",20),r={id:"fires",tabindex:"-1"},o=s("code",null,":Fires",-1),c=s("a",{class:"header-anchor",href:"#fires","aria-label":'Permalink to "`:Fires` <Badge type="tip" text="Server Only" />"'},"",-1),E=a("",13);function g(y,u,v,b,F,C){const e=n("Badge");return h(),l("div",null,[d,s("h2",r,[o,i(),p(e,{type:"tip",text:"Server Only"}),i(),c]),E])}const f=t(k,[["render",g]]);export{B as __pageData,f as default};

View file

@ -0,0 +1,3 @@
import{_ as n,D as p,c as l,m as s,a as e,I as i,U as t,o as r}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Warp","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/warp.md","filePath":"api/1.0/warp.md"}'),h={name:"api/1.0/warp.md"},o={id:"warp",tabindex:"-1"},d=s("a",{class:"header-anchor",href:"#warp","aria-label":'Permalink to "Warp <Badge type="tip" text="1.0" />"'},"",-1),c=s("p",null,"The public main of the Warp library.",-1),k={id:"server",tabindex:"-1"},_=s("code",null,".Server",-1),E=s("a",{class:"header-anchor",href:"#server","aria-label":'Permalink to "`.Server` <Badge type="tip" text="server side" />"'},"",-1),g=t(`<p>Create a new event for Server-Side</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Server</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Event1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Event1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>`,2),y={id:"client",tabindex:"-1"},v=s("code",null,".Client",-1),u=s("a",{class:"header-anchor",href:"#client","aria-label":'Permalink to "`.Client` <Badge type="tip" text="client side" />"'},"",-1),C=t(`<p>Create a new event for Client-Side.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Client</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Event1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Event1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>`,2);function m(b,S,f,A,F,T){const a=p("Badge");return r(),l("div",null,[s("h1",o,[e("Warp "),i(a,{type:"tip",text:"1.0"}),e(),d]),c,s("h2",k,[_,e(),i(a,{type:"tip",text:"server side"}),e(),E]),g,s("h2",y,[v,e(),i(a,{type:"tip",text:"client side"}),e(),u]),C])}const D=n(h,[["render",m]]);export{B as __pageData,D as default};

View file

@ -0,0 +1 @@
import{_ as n,D as p,c as l,m as s,a as e,I as i,U as t,o as r}from"./chunks/framework.BouBWMxc.js";const B=JSON.parse('{"title":"Warp","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/warp.md","filePath":"api/1.0/warp.md"}'),h={name:"api/1.0/warp.md"},o={id:"warp",tabindex:"-1"},d=s("a",{class:"header-anchor",href:"#warp","aria-label":'Permalink to "Warp <Badge type="tip" text="1.0" />"'},"",-1),c=s("p",null,"The public main of the Warp library.",-1),k={id:"server",tabindex:"-1"},_=s("code",null,".Server",-1),E=s("a",{class:"header-anchor",href:"#server","aria-label":'Permalink to "`.Server` <Badge type="tip" text="server side" />"'},"",-1),g=t("",2),y={id:"client",tabindex:"-1"},v=s("code",null,".Client",-1),u=s("a",{class:"header-anchor",href:"#client","aria-label":'Permalink to "`.Client` <Badge type="tip" text="client side" />"'},"",-1),C=t("",2);function m(b,S,f,A,F,T){const a=p("Badge");return r(),l("div",null,[s("h1",o,[e("Warp "),i(a,{type:"tip",text:"1.0"}),e(),d]),c,s("h2",k,[_,e(),i(a,{type:"tip",text:"server side"}),e(),E]),g,s("h2",y,[v,e(),i(a,{type:"tip",text:"client side"}),e(),u]),C])}const D=n(h,[["render",m]]);export{B as __pageData,D as default};

View file

@ -0,0 +1,7 @@
import{j as o,a1 as p,a2 as u,a3 as c,a4 as l,a5 as f,a6 as d,a7 as m,a8 as h,a9 as A,aa as g,ab as v,d as P,u as y,l as C,z as w,ac as _,ad as b,ae as E,af as R}from"./chunks/framework.BouBWMxc.js";import{t as D}from"./chunks/theme.makJcAKq.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(D),j=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&_(),b(),E(),s.setup&&s.setup(),()=>R(s.Layout)}});async function L(){const e=S(),a=O();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function O(){return h(j)}function S(){let e=o,a;return A(t=>{let n=g(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=v(()=>import(n),__vite__mapDeps([]))),o&&(e=!1),r},s.NotFound)}o&&L().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{L as createApp};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,59 @@
import{_ as s,c as i,o as a,U as n}from"./chunks/framework.BouBWMxc.js";const F=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),h={name:"guide/example.md"},l=n(`<h1 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;"></a></h1><p>Let&#39;s try and play something with Warp!</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-t9858" id="tab-019zFZN" checked="checked"><label for="tab-019zFZN">Server</label><input type="radio" name="group-t9858" id="tab-QUEGMRD"><label for="tab-QUEGMRD">Client</label></div><div class="blocks"><div class="language-lua vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;path.to.module&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Example </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Example&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Ping&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Pong&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PingAll </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PingAll&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Example</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, arg1, arg2)</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(arg1, arg2)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;Whooo!&quot;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Ping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player, ping)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PING!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;pong!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fires</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ey!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Players </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> game</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GetService</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Players&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;path.to.module&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Example </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Example&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Ping </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Ping&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Pong&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> PingAll </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Client</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PingAll&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Connect the events</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> connection1</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">connection1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(pong: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pong </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;PONG!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(isPing: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> isPing </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;I GET PINGED!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> end</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Try request a event from server!</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Example</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Invoke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;this is from &gt; &quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">..</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Players.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">LocalPlayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">))</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Do a ping &amp; pong to server!</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Ping</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ping!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">task.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">wait</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- lets wait 1 seconds!</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Disconnect All the events</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PingAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DisconnectAll</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- or Just disconnect spesific connection</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Disconnect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(connection1)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Destroying/Deleting a Event?</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Pong</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">-- Yay Done!</span></span></code></pre></div></div></div>`,3),k=[l];function p(t,e,E,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{F as __pageData,o as default};

View file

@ -0,0 +1 @@
import{_ as s,c as i,o as a,U as n}from"./chunks/framework.BouBWMxc.js";const F=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),h={name:"guide/example.md"},l=n("",3),k=[l];function p(t,e,E,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{F as __pageData,o as default};

View file

@ -0,0 +1 @@
import{_ as s,c as i,o as a,U as t}from"./chunks/framework.BouBWMxc.js";const c=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),e={name:"guide/getting-started.md"},n=t('<h1 id="getting-started" tabindex="-1">Getting Started <a class="header-anchor" href="#getting-started" aria-label="Permalink to &quot;Getting Started&quot;"></a></h1><h3 id="step-1" tabindex="-1"><code>Step 1:</code> <a class="header-anchor" href="#step-1" aria-label="Permalink to &quot;`Step 1:`&quot;"></a></h3><p>First, you have to require the Warp module.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> require</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;path.to.module&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h3 id="step-2" tabindex="-1"><code>Step 2:</code> <a class="header-anchor" href="#step-2" aria-label="Permalink to &quot;`Step 2:`&quot;"></a></h3><p>Then, to create a new event you have to use <code>.Server</code> function</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Remote </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Warp.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;EventName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><h3 id="step-3" tabindex="-1"><code>Step 3:</code> <a class="header-anchor" href="#step-3" aria-label="Permalink to &quot;`Step 3:`&quot;"></a></h3><p>Firing event everytime player join</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">local</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Players </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> game</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GetService</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Players&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Players.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">PlayerAdded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Connect</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(player)</span></span>\n<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Remote</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">Fire</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, player, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Welcome!&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">end</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>',10),h=[n];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(e,[["render",l]]);export{c as __pageData,y as default};

View file

@ -0,0 +1 @@
import{_ as s,c as i,o as a,U as t}from"./chunks/framework.BouBWMxc.js";const c=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),e={name:"guide/getting-started.md"},n=t("",10),h=[n];function l(p,k,r,d,o,E){return a(),i("div",null,h)}const y=s(e,[["render",l]]);export{c as __pageData,y as default};

View file

@ -0,0 +1 @@
import{_ as a,c as e,o as t,U as r}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r('<h1 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to &quot;Overview&quot;"></a></h1><p>Warp is a networking library for Roblox that comes with very fast performance and efficient with Type to any-scale games.</p><h2 id="why-warp" tabindex="-1">Why Warp <a class="header-anchor" href="#why-warp" aria-label="Permalink to &quot;Why Warp&quot;"></a></h2><h3 id="⚡-performance" tabindex="-1">⚡ Performance <a class="header-anchor" href="#⚡-performance" aria-label="Permalink to &quot;⚡ Performance&quot;"></a></h3><p>Warp is very-fast with much less bandwidth compared to native.</p><h3 id="🍃-lightweight" tabindex="-1">🍃 Lightweight <a class="header-anchor" href="#🍃-lightweight" aria-label="Permalink to &quot;🍃 Lightweight&quot;"></a></h3><p>Warp is a lightweight library for Roblox.</p><h3 id="📊-task" tabindex="-1">📊 Task <a class="header-anchor" href="#📊-task" aria-label="Permalink to &quot;📊 Task&quot;"></a></h3><p>Warp optimized efficient for large-scale task.</p><h3 id="🔎-typing" tabindex="-1">🔎 Typing <a class="header-anchor" href="#🔎-typing" aria-label="Permalink to &quot;🔎 Typing&quot;"></a></h3><p>Warp written with strictly-typed.</p>',11),n=[o];function h(s,l,c,d,p,f){return t(),e("div",null,n)}const g=a(i,[["render",h]]);export{m as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as a,c as e,o as t,U as r}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r("",11),n=[o];function h(s,l,c,d,p,f){return t(),e("div",null,n)}const g=a(i,[["render",h]]);export{m as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as a,c as t,o as l,U as i}from"./chunks/framework.BouBWMxc.js";const k=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),e={name:"guide/installation.md"},o=i('<h1 id="installation" tabindex="-1">Installation <a class="header-anchor" href="#installation" aria-label="Permalink to &quot;Installation&quot;"></a></h1><h2 id="with-wally" tabindex="-1"><code>with Wally</code> <a class="header-anchor" href="#with-wally" aria-label="Permalink to &quot;`with Wally`&quot;"></a></h2><ol><li>Get Rojo and Wally ready.</li><li>Add Warp to your <code>wally.toml</code>.</li></ol><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-YbSHN" id="tab-IZCWhd1" checked="checked"><label for="tab-IZCWhd1">wally.toml</label></div><div class="blocks"><div class="language-toml vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">dependencies</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">warp = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;imezx/warp@1.0.0&quot;</span></span></code></pre></div><ol start="3"><li>Run <code>wally install</code> in command.</li><li>Link the module and Your Done!</li></ol><h2 id="without-wally" tabindex="-1"><code>without Wally</code> <a class="header-anchor" href="#without-wally" aria-label="Permalink to &quot;`without Wally`&quot;"></a></h2><ol><li>Get the <code>.rbxm</code> file from the <a href="https://github.com/imezx/Warp" target="_blank" rel="noreferrer">github</a></li><li>Import the <code>.rbxm</code> file into roblox studio manually and Done!</li></ol></div></div>',4),s=[o];function n(d,r,h,c,p,u){return l(),t("div",null,s)}const _=a(e,[["render",n]]);export{k as __pageData,_ as default};

View file

@ -0,0 +1 @@
import{_ as a,c as t,o as l,U as i}from"./chunks/framework.BouBWMxc.js";const k=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),e={name:"guide/installation.md"},o=i("",4),s=[o];function n(d,r,h,c,p,u){return l(),t("div",null,s)}const _=a(e,[["render",n]]);export{k as __pageData,_ as default};

View file

@ -0,0 +1 @@
import{_ as e,c as t,o as i}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"image":{"src":"/warp.png"},"name":"Warp","text":"A very-fast & powerful networking library for Roblox.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/warp"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/Warp"}]},"features":[{"icon":"⚡","title":"Performance","details":"Warp is very-fast with much less bandwidth compared to native."},{"icon":"🍃","title":"Lightweight","details":"Warp is a lightweight library for Roblox."},{"icon":"📊","title":"Task","details":"Warp optimized efficient for large-scale task."},{"icon":"🔎","title":"Type","details":"Warp written with strictly-typed."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function r(o,n,s,l,c,p){return i(),t("div")}const h=e(a,[["render",r]]);export{m as __pageData,h as default};

View file

@ -0,0 +1 @@
import{_ as e,c as t,o as i}from"./chunks/framework.BouBWMxc.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"image":{"src":"/warp.png"},"name":"Warp","text":"A very-fast & powerful networking library for Roblox.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/warp"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/Warp"}]},"features":[{"icon":"⚡","title":"Performance","details":"Warp is very-fast with much less bandwidth compared to native."},{"icon":"🍃","title":"Lightweight","details":"Warp is a lightweight library for Roblox."},{"icon":"📊","title":"Task","details":"Warp optimized efficient for large-scale task."},{"icon":"🔎","title":"Type","details":"Warp written with strictly-typed."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function r(o,n,s,l,c,p){return i(),t("div")}const h=e(a,[["render",r]]);export{m as __pageData,h as default};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

BIN
docs/.vitepress/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

83
docs/.vitepress/dist/guide/example.html vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

25
docs/.vitepress/dist/guide/index.html vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
docs/.vitepress/dist/hashmap.json vendored Normal file
View file

@ -0,0 +1 @@
{"index.md":"Wvz5TWej","guide_getting-started.md":"MBXKETNI","guide_installation.md":"fMU35fgi","api_1.0_warp.md":"u63PLmMH","guide_index.md":"xfhCFaBM","api_1.0_server.md":"w4zn1XZZ","guide_example.md":"7eqi7edp","api_1.0_ratelimit.md":"gPb2PQ91","api_1.0_client.md":"FTim0Kz_"}

BIN
docs/.vitepress/dist/header.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/.vitepress/dist/icon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

25
docs/.vitepress/dist/index.html vendored Normal file

File diff suppressed because one or more lines are too long

BIN
docs/.vitepress/dist/warp.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View file

@ -0,0 +1,4 @@
import DefaultTheme from 'vitepress/theme'
import './style.css'
export default DefaultTheme;

View file

@ -0,0 +1,82 @@
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
--vp-c-default-soft: var(--vp-c-gray-soft);
--vp-c-brand-1: var(--vp-c-indigo-1);
--vp-c-brand-2: var(--vp-c-indigo-2);
--vp-c-brand-3: var(--vp-c-indigo-3);
--vp-c-brand-soft: var(--vp-c-indigo-soft);
--vp-c-tip-1: var(--vp-c-brand-1);
--vp-c-tip-2: var(--vp-c-brand-2);
--vp-c-tip-3: var(--vp-c-brand-3);
--vp-c-tip-soft: var(--vp-c-brand-soft);
--vp-c-warning-1: var(--vp-c-yellow-1);
--vp-c-warning-2: var(--vp-c-yellow-2);
--vp-c-warning-3: var(--vp-c-yellow-3);
--vp-c-warning-soft: var(--vp-c-yellow-soft);
--vp-c-danger-1: var(--vp-c-red-1);
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);
}
:root {
--vp-button-brand-border: transparent;
--vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand-3);
--vp-button-brand-hover-border: transparent;
--vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
--vp-button-brand-active-border: transparent;
--vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-c-brand-1);
}
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(120deg,
#fe5234 30%,
#fe9934);
--vp-home-hero-image-background-image: linear-gradient(-45deg,
#fe5234 50%,
#fe9934 50%);
--vp-home-hero-image-filter: blur(40px);
}
@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}
@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(72px);
}
}
:root {
--vp-custom-block-tip-border: transparent;
--vp-custom-block-tip-text: var(--vp-c-text-1);
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}
.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
}
.VPNavBarTitle .title {
/* background: linear-gradient(120deg,
#6034fe 30%,
#fe3434);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text; */
color: rgb(255, 153, 0);
}

143
docs/api/1.0/client.md Normal file
View file

@ -0,0 +1,143 @@
# Client
For Client-sided
## `.Client`
Create new Warp event.
::: code-group
```lua [Variable]
(
Identifier: string
)
```
```lua [Example]
local Remote = Warp.new("Remote")
```
:::
## `:Connect`
Connect event to receive incoming from server way.
::: code-group
```lua [Variable]
(
callback: (...any) -> ()
)
```
```lua [Example]
Remote:Connect(function(...)
print(...)
end)
```
:::
## `:Once`
This function likely `:Connect` but it disconnect the event once it fired.
::: code-group
```lua [Variable]
(
callback: (...any) -> ()
)
```
```lua [Example]
Remote:Once(function(...)
print(...)
end)
```
:::
## `:Disconnect`
Disconnect the event connection.
::: code-group
```lua [Variable]
(
key: string
)
```
```lua [Example]
local connection = Remote:Connect(function(player, ...) end) -- store the key
Remote:Disconnect(connection)
```
:::
## `:DisconnectAll`
Disconnect All the event connection.
```lua [Example]
Remote:DisconnectAll()
```
## `:Fire`
Fire the event to the spesific server with data.
::: code-group
```lua [Variable]
(
reliable: boolean,
...: any
)
```
```lua [Example]
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.
::: code-group
```lua [Variable]
(
timeout: number,
...: any
) -> (...any)
```
```lua [Example]
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()
```

28
docs/api/1.0/ratelimit.md Normal file
View file

@ -0,0 +1,28 @@
# Rate Limit
Ratelimit is one of most useful feature.
( Configured on Server and For Client )
## `Setup`
When creating a event on Server, you can add second argument as table `rateLimit` to limit the number of times the event can be called and the interval for reset the counter.
::: code-group
```lua [Server]
-- Server
-- Let's make the event have ratelimit with max 50 entrance for 2 seconds.
local Remote = Warp.Server("Remote1", {
maxEntrance = 50, -- maximum 50 fires.
interval = 2, -- 2 seconds
})
-- Now the Event RateLimit is configured, and ready to use.
-- No need anything to adds on client side.
```
```lua [Client]
-- Client
local Remote = Warp.Client("Remote1")
-- The Event will automatic it self for retreiving the rate limit configuration from the server.
```
:::

164
docs/api/1.0/server.md Normal file
View file

@ -0,0 +1,164 @@
# Server
For Server-sided
## `.Server`
Create new Warp event.
::: code-group
```lua [Variable]
(
Identifier: string,
rateLimit: {
maxEntrance: number,
interval: number,
}?
)
```
```lua [Example]
local Remote = Warp.new("Remote")
```
:::
## `:Connect`
Connect event to receive incoming from client way.
::: code-group
```lua [Variable]
(
player: Player,
callback: (...any) -> ()
): string
```
```lua [Example]
Remote:Connect(function(player, ...)
print(player, ...)
end)
```
:::
## `:Once`
This function likely `:Connect` but it disconnect the event once it fired.
::: code-group
```lua [Variable]
(
player: Player,
callback: (...any) -> ()
)
```
```lua [Example]
Remote:Once(function(player, ...)
print(player, ...)
end)
```
:::
## `:Disconnect`
Disconnect the event connection.
::: code-group
```lua [Variable]
(
key: string
)
```
```lua [Example]
local connection = Remote:Connect(function(player, ...) end) -- store the key
Remote:Disconnect(connection)
```
:::
## `:DisconnectAll`
Disconnect All the event connection.
```lua [Example]
Remote:DisconnectAll()
```
## `:Fire`
Fire the event to a client.
::: code-group
```lua [Variable]
(
reliable: boolean,
player: Player,
...: any
)
```
```lua [Example]
Remote:Fire(true, player, "Hello World!")
```
:::
## `:Fires` <Badge type="tip" text="Server Only" />
Fire the event to all clients.
::: code-group
```lua [Variable]
(
reliable: boolean,
...: any
)
```
```lua [Example]
Remote:Fires(true, "Hello World!")
```
:::
## `:Invoke`
Semiliar to `:InvokeClient`, its for Invoke to a client.
::: code-group
```lua [Variable]
(
timeout: number,
player: Player,
...: any
) -> (...any)
```
```lua [Example]
local Request = Remote:Invoke(2, player, "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()
```

21
docs/api/1.0/warp.md Normal file
View file

@ -0,0 +1,21 @@
# Warp <Badge type="tip" text="1.0" />
The public main of the Warp library.
## `.Server` <Badge type="tip" text="server side" />
Create a new event for Server-Side
```lua
-- Server
local Event1 = Warp.Server("Event1")
```
## `.Client` <Badge type="tip" text="client side" />
Create a new event for Client-Side.
```lua
-- Client
local Event1 = Warp.Client("Event1")
```

View file

@ -0,0 +1,23 @@
import{_ as s,o as a,c as n,Q as e}from"./chunks/framework.419948d5.js";const u=JSON.parse('{"title":"Client","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/client.md","filePath":"api/1.0/client.md"}'),l={name:"api/1.0/client.md"},o=e(`<h1 id="client" tabindex="-1">Client <a class="header-anchor" href="#client" aria-label="Permalink to &quot;Client&quot;"></a></h1><p>A Client-sided Connection</p><h2 id="new" tabindex="-1"><code>.new</code> <a class="header-anchor" href="#new" aria-label="Permalink to &quot;\`.new\`&quot;"></a></h2><p>Create new FastNet2 event</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Identifier</span><span style="color:#E1E4E8;">: string</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Identifier</span><span style="color:#24292E;">: string</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><p>Identifier will converte/encode into hash identifier</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Remote </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Remote&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Remote </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Remote&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><h2 id="connect-or-listen" tabindex="-1"><code>:Connect</code> or <code>:Listen</code> <a class="header-anchor" href="#connect-or-listen" aria-label="Permalink to &quot;\`:Connect\` or \`:Listen\`&quot;"></a></h2><p>Listen an event from the server to receive, <code>:Connect</code> and <code>:Listen</code> is the same function.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">callback</span><span style="color:#E1E4E8;">: (</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">any) </span><span style="color:#F97583;">-&gt;</span><span style="color:#E1E4E8;"> ()</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">callback</span><span style="color:#24292E;">: (</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">any) </span><span style="color:#D73A49;">-&gt;</span><span style="color:#24292E;"> ()</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><p>Each event only allowed have one callback.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(...)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(...)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span></code></pre></div><p>to know if the event is connected or not by doing <code>.Connected</code></p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(Remote.</span><span style="color:#B392F0;">Connected</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#005CC5;">print</span><span style="color:#24292E;">(Remote.</span><span style="color:#6F42C1;">Connected</span><span style="color:#24292E;">)</span></span></code></pre></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Disconnect</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Disconnect</span><span style="color:#24292E;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to the server with data.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">: any</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">...</span><span style="color:#24292E;">: any</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fire</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Hello World!&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fire</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Hello World!&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function have rate limiting to prevent spamming</p></div><h2 id="pull" tabindex="-1"><code>:Pull</code> <a class="header-anchor" href="#pull" aria-label="Permalink to &quot;\`:Pull\`&quot;"></a></h2><p>Pull is a function that invoke to server.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">timeout</span><span style="color:#E1E4E8;">: number,</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">: any</span></span>
<span class="line"><span style="color:#E1E4E8;">) </span><span style="color:#F97583;">-&gt;</span><span style="color:#E1E4E8;"> (</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">any)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">timeout</span><span style="color:#24292E;">: number,</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">...</span><span style="color:#24292E;">: any</span></span>
<span class="line"><span style="color:#24292E;">) </span><span style="color:#D73A49;">-&gt;</span><span style="color:#24292E;"> (</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Request </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Pull</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">2</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&quot;Hello World!&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Request </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Pull</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">2</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&quot;Hello World!&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, and the minimum for timeout is 2 (seconds)</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event that triggered/pinged</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Wait</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Wait</span><span style="color:#24292E;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect the event and Remove the event from FastNet2</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Destroy</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Destroy</span><span style="color:#24292E;">()</span></span></code></pre></div>`,34),p=[o];function t(c,r,i,d,y,E){return a(),n("div",null,p)}const g=s(l,[["render",t]]);export{u as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as s,o as a,c as n,Q as e}from"./chunks/framework.419948d5.js";const u=JSON.parse('{"title":"Client","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/client.md","filePath":"api/1.0/client.md"}'),l={name:"api/1.0/client.md"},o=e("",34),p=[o];function t(c,r,i,d,y,E){return a(),n("div",null,p)}const g=s(l,[["render",t]]);export{u as __pageData,g as default};

View file

@ -0,0 +1,31 @@
import{_ as s,o as a,c as n,Q as l}from"./chunks/framework.419948d5.js";const u=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),e={name:"api/1.0/server.md"},o=l(`<h1 id="server" tabindex="-1">Server <a class="header-anchor" href="#server" aria-label="Permalink to &quot;Server&quot;"></a></h1><p>A Server-sided Connection</p><h2 id="new" tabindex="-1"><code>.new</code> <a class="header-anchor" href="#new" aria-label="Permalink to &quot;\`.new\`&quot;"></a></h2><p>Create new FastNet2 event</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Identifier</span><span style="color:#E1E4E8;">: string</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Identifier</span><span style="color:#24292E;">: string</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><p>Identifier will converte/encode into hash identifier</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Remote </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Remote&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Remote </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Remote&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><h2 id="connect-or-listen" tabindex="-1"><code>:Connect</code> or <code>:Listen</code> <a class="header-anchor" href="#connect-or-listen" aria-label="Permalink to &quot;\`:Connect\` or \`:Listen\`&quot;"></a></h2><p>Listen an event from the server to receive, <code>:Connect</code> and <code>:Listen</code> is the same function.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">callback</span><span style="color:#E1E4E8;">: (</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">any) </span><span style="color:#F97583;">-&gt;</span><span style="color:#E1E4E8;"> ()</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">callback</span><span style="color:#24292E;">: (</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">any) </span><span style="color:#D73A49;">-&gt;</span><span style="color:#24292E;"> ()</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><p>Each event only allowed have one callback.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(...)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(...)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span></code></pre></div><p>to know if the event is connected or not by doing <code>.Connected</code></p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(Remote.</span><span style="color:#B392F0;">Connected</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#005CC5;">print</span><span style="color:#24292E;">(Remote.</span><span style="color:#6F42C1;">Connected</span><span style="color:#24292E;">)</span></span></code></pre></div><h2 id="disconnect" tabindex="-1"><code>:Disconnect</code> <a class="header-anchor" href="#disconnect" aria-label="Permalink to &quot;\`:Disconnect\`&quot;"></a></h2><p>Disconnect the event</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Disconnect</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Disconnect</span><span style="color:#24292E;">()</span></span></code></pre></div><h2 id="fire" tabindex="-1"><code>:Fire</code> <a class="header-anchor" href="#fire" aria-label="Permalink to &quot;\`:Fire\`&quot;"></a></h2><p>Fire the event to the spesific client with data.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">player</span><span style="color:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">: any</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">player</span><span style="color:#24292E;">: Player,</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">...</span><span style="color:#24292E;">: any</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fire</span><span style="color:#E1E4E8;">(player, </span><span style="color:#9ECBFF;">&quot;Hello World!&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fire</span><span style="color:#24292E;">(player, </span><span style="color:#032F62;">&quot;Hello World!&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function have rate limiting to prevent spamming</p></div><h2 id="fires" tabindex="-1"><code>:Fires</code> <a class="header-anchor" href="#fires" aria-label="Permalink to &quot;\`:Fires\`&quot;"></a></h2><p>Fire the event to all clients with data.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">: any</span></span>
<span class="line"><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">...</span><span style="color:#24292E;">: any</span></span>
<span class="line"><span style="color:#24292E;">)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fires</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Hello World!&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fires</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Hello World!&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function have rate limiting to prevent spamming</p></div><h2 id="pull" tabindex="-1"><code>:Pull</code> <a class="header-anchor" href="#pull" aria-label="Permalink to &quot;\`:Pull\`&quot;"></a></h2><p>Pull is a function that invoke to server.</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">(</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">timeout</span><span style="color:#E1E4E8;">: number,</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">player</span><span style="color:#E1E4E8;">: Player,</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">: any</span></span>
<span class="line"><span style="color:#E1E4E8;">) </span><span style="color:#F97583;">-&gt;</span><span style="color:#E1E4E8;"> (</span><span style="color:#79B8FF;">...</span><span style="color:#E1E4E8;">any)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">(</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">timeout</span><span style="color:#24292E;">: number,</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">player</span><span style="color:#24292E;">: Player,</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">...</span><span style="color:#24292E;">: any</span></span>
<span class="line"><span style="color:#24292E;">) </span><span style="color:#D73A49;">-&gt;</span><span style="color:#24292E;"> (</span><span style="color:#005CC5;">...</span><span style="color:#24292E;">any)</span></span></code></pre></div><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Request </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Pull</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">2</span><span style="color:#E1E4E8;">, player, </span><span style="color:#9ECBFF;">&quot;Hello World!&quot;</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Request </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Pull</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">2</span><span style="color:#24292E;">, player, </span><span style="color:#032F62;">&quot;Hello World!&quot;</span><span style="color:#24292E;">)</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded, and the minimum for timeout is 2 (seconds)</p></div><h2 id="wait" tabindex="-1"><code>:Wait</code> <a class="header-anchor" href="#wait" aria-label="Permalink to &quot;\`:Wait\`&quot;"></a></h2><p>Wait the event that triggered/pinged</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Wait</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Wait</span><span style="color:#24292E;">()</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This function is yielded</p></div><h2 id="destroy" tabindex="-1"><code>:Destroy</code> <a class="header-anchor" href="#destroy" aria-label="Permalink to &quot;\`:Destroy\`&quot;"></a></h2><p>Disconnect the event and Remove the event from FastNet2</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Destroy</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Destroy</span><span style="color:#24292E;">()</span></span></code></pre></div>`,39),p=[o];function t(c,r,i,d,y,E){return a(),n("div",null,p)}const v=s(e,[["render",t]]);export{u as __pageData,v as default};

View file

@ -0,0 +1 @@
import{_ as s,o as a,c as n,Q as l}from"./chunks/framework.419948d5.js";const u=JSON.parse('{"title":"Server","description":"","frontmatter":{},"headers":[],"relativePath":"api/1.0/server.md","filePath":"api/1.0/server.md"}'),e={name:"api/1.0/server.md"},o=l("",39),p=[o];function t(c,r,i,d,y,E){return a(),n("div",null,p)}const v=s(e,[["render",t]]);export{u as __pageData,v as default};

View file

@ -0,0 +1 @@
import{s as o,Z as p,$ as i,a0 as u,a1 as c,a2 as l,a3 as f,a4 as d,a5 as m,a6 as h,a7 as A,a8 as g,d as y,u as P,j as v,y as C,a9 as w,aa as _,ab as b,ac as E}from"./chunks/framework.419948d5.js";import{t as R}from"./chunks/theme.00fffdec.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=r(R),D=y({name:"VitePressApp",setup(){const{site:e}=P();return v(()=>{C(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),w(),_(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function j(){const e=S(),a=O();a.provide(i,e);const t=u(e.route);return a.provide(c,t),a.component("Content",l),a.component("ClientOnly",f),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:d}),{app:a,router:e,data:t}}function O(){return m(D)}function S(){let e=o,a;return h(t=>{let n=A(t);return n?(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),o&&(e=!1),g(()=>import(n),[])):null},s.NotFound)}o&&j().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{j as createApp};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,127 @@
import{_ as s,o as n,c as a,Q as l}from"./chunks/framework.419948d5.js";const C=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),p={name:"guide/example.md"},o=l(`<h1 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;"></a></h1><p>Let&#39;s try and play something with FastNet2!</p><h2 id="server-side" tabindex="-1">Server-Side <a class="header-anchor" href="#server-side" aria-label="Permalink to &quot;Server-Side&quot;"></a></h2><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> FastNet2 </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">require</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;path.to.module&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Events</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Example </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Example&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Ping </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Ping&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Pong </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Pong&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> PingAll </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;PingAll&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">Example</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(player, arg1, arg2)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(arg1, arg2)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">&quot;Whooo!&quot;</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">Ping</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(player, ping)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> ping </span><span style="color:#F97583;">then</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;PING!&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Pong</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fire</span><span style="color:#E1E4E8;">(player, </span><span style="color:#79B8FF;">true</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">PingAll</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fires</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">true</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">end</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> FastNet2 </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">require</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;path.to.module&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Events</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Example </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Example&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Ping </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Ping&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Pong </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Pong&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> PingAll </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;PingAll&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">Example</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(player, arg1, arg2)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(arg1, arg2)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> </span><span style="color:#032F62;">&quot;Whooo!&quot;</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">Ping</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(player, ping)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">if</span><span style="color:#24292E;"> ping </span><span style="color:#D73A49;">then</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;PING!&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Pong</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fire</span><span style="color:#24292E;">(player, </span><span style="color:#005CC5;">true</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">PingAll</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fires</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">true</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">end</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span></code></pre></div><h2 id="client-side" tabindex="-1">Client-Side <a class="header-anchor" href="#client-side" aria-label="Permalink to &quot;Client-Side&quot;"></a></h2><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Players </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">game</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">GetService</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Players&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> FastNet2 </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">require</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;path.to.module&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Events</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Example </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Example&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Ping </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Ping&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Pong </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Pong&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> PingAll </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;PingAll&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Connect the events</span></span>
<span class="line"><span style="color:#B392F0;">Pong</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(pong: </span><span style="color:#79B8FF;">boolean</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> pong </span><span style="color:#F97583;">then</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;PONG!&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">end</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">PingAll</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(isPing: </span><span style="color:#79B8FF;">boolean</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> isPing </span><span style="color:#F97583;">then</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;I PINGED!&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">end</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Let&#39;s check if the events is being connected!</span></span>
<span class="line"><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(Pong.</span><span style="color:#B392F0;">Connected</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(PingAll.</span><span style="color:#B392F0;">Connected</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Let&#39;s wait \`Example\` event being triggered!</span></span>
<span class="line"><span style="color:#E1E4E8;">task.</span><span style="color:#79B8FF;">spawn</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Waiting for the event...&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Example</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Wait</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Hey the event just triggered!&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Try request a event from server!</span></span>
<span class="line"><span style="color:#79B8FF;">print</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">Example</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Pull</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Hello&quot;</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&quot;this is from &gt; &quot;</span><span style="color:#F97583;">..</span><span style="color:#E1E4E8;">Players.</span><span style="color:#B392F0;">LocalPlayer</span><span style="color:#E1E4E8;">.</span><span style="color:#B392F0;">Name</span><span style="color:#E1E4E8;">))</span></span>
<span class="line"><span style="color:#6A737D;">-- Do a ping &amp; pong to server!</span></span>
<span class="line"><span style="color:#B392F0;">Ping</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fire</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">true</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">task.</span><span style="color:#79B8FF;">wait</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">1</span><span style="color:#E1E4E8;">) </span><span style="color:#6A737D;">-- lets wait 1 seconds!</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Disconnect the events</span></span>
<span class="line"><span style="color:#B392F0;">Pong</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Disconnect</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"><span style="color:#B392F0;">PingAll</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Disconnect</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Yay Done!</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Players </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">game</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">GetService</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Players&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> FastNet2 </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">require</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;path.to.module&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Events</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Example </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Example&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Ping </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Ping&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Pong </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Pong&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> PingAll </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;PingAll&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Connect the events</span></span>
<span class="line"><span style="color:#6F42C1;">Pong</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(pong: </span><span style="color:#005CC5;">boolean</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">if</span><span style="color:#24292E;"> pong </span><span style="color:#D73A49;">then</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;PONG!&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">end</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">PingAll</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(isPing: </span><span style="color:#005CC5;">boolean</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">if</span><span style="color:#24292E;"> isPing </span><span style="color:#D73A49;">then</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;I PINGED!&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#D73A49;">end</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Let&#39;s check if the events is being connected!</span></span>
<span class="line"><span style="color:#005CC5;">print</span><span style="color:#24292E;">(Pong.</span><span style="color:#6F42C1;">Connected</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#005CC5;">print</span><span style="color:#24292E;">(PingAll.</span><span style="color:#6F42C1;">Connected</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Let&#39;s wait \`Example\` event being triggered!</span></span>
<span class="line"><span style="color:#24292E;">task.</span><span style="color:#005CC5;">spawn</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">()</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Waiting for the event...&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Example</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Wait</span><span style="color:#24292E;">()</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Hey the event just triggered!&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Try request a event from server!</span></span>
<span class="line"><span style="color:#005CC5;">print</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">Example</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Pull</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Hello&quot;</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&quot;this is from &gt; &quot;</span><span style="color:#D73A49;">..</span><span style="color:#24292E;">Players.</span><span style="color:#6F42C1;">LocalPlayer</span><span style="color:#24292E;">.</span><span style="color:#6F42C1;">Name</span><span style="color:#24292E;">))</span></span>
<span class="line"><span style="color:#6A737D;">-- Do a ping &amp; pong to server!</span></span>
<span class="line"><span style="color:#6F42C1;">Ping</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fire</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">true</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">task.</span><span style="color:#005CC5;">wait</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">1</span><span style="color:#24292E;">) </span><span style="color:#6A737D;">-- lets wait 1 seconds!</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Disconnect the events</span></span>
<span class="line"><span style="color:#6F42C1;">Pong</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Disconnect</span><span style="color:#24292E;">()</span></span>
<span class="line"><span style="color:#6F42C1;">PingAll</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Disconnect</span><span style="color:#24292E;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">-- Yay Done!</span></span></code></pre></div>`,6),e=[o];function t(c,r,E,y,i,F){return n(),a("div",null,e)}const g=s(p,[["render",t]]);export{C as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as s,o as n,c as a,Q as l}from"./chunks/framework.419948d5.js";const C=JSON.parse('{"title":"Example","description":"","frontmatter":{},"headers":[],"relativePath":"guide/example.md","filePath":"guide/example.md"}'),p={name:"guide/example.md"},o=l("",6),e=[o];function t(c,r,E,y,i,F){return n(),a("div",null,e)}const g=s(p,[["render",t]]);export{C as __pageData,g as default};

View file

@ -0,0 +1,9 @@
import{_ as s,o as a,c as e,Q as n}from"./chunks/framework.419948d5.js";const F=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),l={name:"guide/getting-started.md"},o=n(`<h1 id="getting-started" tabindex="-1">Getting Started <a class="header-anchor" href="#getting-started" aria-label="Permalink to &quot;Getting Started&quot;"></a></h1><p>First, you have to require the module</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> FastNet2 </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">require</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;path.to.module&#39;</span><span style="color:#E1E4E8;">);</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> FastNet2 </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">require</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;path.to.module&#39;</span><span style="color:#24292E;">);</span></span></code></pre></div><p>Then, to create a new event you have to use <code>.new</code> function</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Remote </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> FastNet2.</span><span style="color:#79B8FF;">new</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;EventName&quot;</span><span style="color:#E1E4E8;">);</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Remote </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> FastNet2.</span><span style="color:#005CC5;">new</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;EventName&quot;</span><span style="color:#24292E;">);</span></span></code></pre></div><p>Firing event everytime player join</p><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> Players </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">game</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">GetService</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Players&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">Players.</span><span style="color:#B392F0;">PlayerAdded</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Connect</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(player)</span></span>
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Remote</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">Fire</span><span style="color:#E1E4E8;">(player, </span><span style="color:#9ECBFF;">&quot;Welcome!&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#F97583;">end</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> Players </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">game</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">GetService</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Players&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">Players.</span><span style="color:#6F42C1;">PlayerAdded</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Connect</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(player)</span></span>
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Remote</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">Fire</span><span style="color:#24292E;">(player, </span><span style="color:#032F62;">&quot;Welcome!&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#D73A49;">end</span><span style="color:#24292E;">)</span></span></code></pre></div><p>FastNet2 have built-in feature called <code>pre-process</code> that could wait until the player event is being connected, so you dont have worry about that!</p>`,8),p=[o];function t(c,r,y,i,E,d){return a(),e("div",null,p)}const g=s(l,[["render",t]]);export{F as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as s,o as a,c as e,Q as n}from"./chunks/framework.419948d5.js";const F=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),l={name:"guide/getting-started.md"},o=n("",8),p=[o];function t(c,r,y,i,E,d){return a(),e("div",null,p)}const g=s(l,[["render",t]]);export{F as __pageData,g as default};

View file

@ -0,0 +1 @@
import{_ as e,o as a,c as t,Q as r}from"./chunks/framework.419948d5.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r('<h1 id="overview" tabindex="-1">Overview <a class="header-anchor" href="#overview" aria-label="Permalink to &quot;Overview&quot;"></a></h1><p>FastNet2 is a networking library for Roblox, where its very-fast performance and lightweight.</p><h2 id="why-fastnet2" tabindex="-1">Why FastNet2 <a class="header-anchor" href="#why-fastnet2" aria-label="Permalink to &quot;Why FastNet2&quot;"></a></h2><h3 id="⚡-performance" tabindex="-1">⚡ Performance <a class="header-anchor" href="#⚡-performance" aria-label="Permalink to &quot;⚡ Performance&quot;"></a></h3><p>FastNet2 is very-fast with high performance networking, only use a single remote event to reduce bandwidth usage and increase performance gain.</p><h3 id="🍃-lightweight" tabindex="-1">🍃 Lightweight <a class="header-anchor" href="#🍃-lightweight" aria-label="Permalink to &quot;🍃 Lightweight&quot;"></a></h3><p>FastNet2 is a lightweight module for roblox games</p><h3 id="📊-task" tabindex="-1">📊 Task <a class="header-anchor" href="#📊-task" aria-label="Permalink to &quot;📊 Task&quot;"></a></h3><p>FastNet2 been optimized for a game that have heavy usage and require optimizations</p><h3 id="🔒-secure" tabindex="-1">🔒 Secure <a class="header-anchor" href="#🔒-secure" aria-label="Permalink to &quot;🔒 Secure&quot;"></a></h3><p>FastNet2 have built-in feature where it securing their data network to make exploiters harder to exploit it</p>',11),n=[o];function h(s,d,l,c,u,p){return a(),t("div",null,n)}const _=e(i,[["render",h]]);export{m as __pageData,_ as default};

View file

@ -0,0 +1 @@
import{_ as e,o as a,c as t,Q as r}from"./chunks/framework.419948d5.js";const m=JSON.parse('{"title":"Overview","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),i={name:"guide/index.md"},o=r("",11),n=[o];function h(s,d,l,c,u,p){return a(),t("div",null,n)}const _=e(i,[["render",h]]);export{m as __pageData,_ as default};

View file

@ -0,0 +1,3 @@
import{_ as a,o as t,c as l,Q as e}from"./chunks/framework.419948d5.js";const _=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),o={name:"guide/installation.md"},s=e(`<h1 id="installation" tabindex="-1">Installation <a class="header-anchor" href="#installation" aria-label="Permalink to &quot;Installation&quot;"></a></h1><h2 id="with-wally" tabindex="-1">with Wally <a class="header-anchor" href="#with-wally" aria-label="Permalink to &quot;with Wally&quot;"></a></h2><ol><li>Get Rojo and Wally ready.</li><li>Add FastNet2 to your <code>wally.toml</code>.</li></ol><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-w2PR3" id="tab-UzU_n9f" checked="checked"><label for="tab-UzU_n9f">wally.toml</label></div><div class="blocks"><div class="language-toml vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#B392F0;">dependencies</span><span style="color:#E1E4E8;">]</span></span>
<span class="line"><span style="color:#E1E4E8;">fastnet2 = </span><span style="color:#9ECBFF;">&quot;imezx/fastnet2@0.9.1&quot;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">[</span><span style="color:#6F42C1;">dependencies</span><span style="color:#24292E;">]</span></span>
<span class="line"><span style="color:#24292E;">fastnet2 = </span><span style="color:#032F62;">&quot;imezx/fastnet2@0.9.1&quot;</span></span></code></pre></div><ol start="3"><li>Run <code>wally install</code> in command.</li><li>Link/Require the module and Done!</li></ol><h2 id="without-wally" tabindex="-1">without Wally <a class="header-anchor" href="#without-wally" aria-label="Permalink to &quot;without Wally&quot;"></a></h2><ol><li>Get the <code>.rbxm</code> file from the <a href="https://github.com/imezx/FastNet2" target="_blank" rel="noreferrer">github</a></li><li>Import the <code>.rbxm</code> file into roblox studio manually and Done!</li></ol></div></div>`,4),n=[s];function i(c,d,r,p,h,u){return t(),l("div",null,n)}const y=a(o,[["render",i]]);export{_ as __pageData,y as default};

View file

@ -0,0 +1 @@
import{_ as a,o as t,c as l,Q as e}from"./chunks/framework.419948d5.js";const _=JSON.parse('{"title":"Installation","description":"","frontmatter":{},"headers":[],"relativePath":"guide/installation.md","filePath":"guide/installation.md"}'),o={name:"guide/installation.md"},s=e("",4),n=[s];function i(c,d,r,p,h,u){return t(),l("div",null,n)}const y=a(o,[["render",i]]);export{_ as __pageData,y as default};

View file

@ -0,0 +1 @@
import{_ as e,o as t,c as a}from"./chunks/framework.419948d5.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"FastNet2","text":"A incredible and power networking module for roblox games.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/server"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/FastNet2"}]},"features":[{"icon":"⚡","title":"Performance","details":"FastNet2 is very-fast with high performance networking, only use a single remote event to reduce bandwidth usage and increase performance gain."},{"icon":"🍃","title":"Lightweight","details":"FastNet2 is a lightweight module for roblox games"},{"icon":"📊","title":"Task","details":"FastNet2 been optimized for a game that have heavy usage and require optimizations"},{"icon":"🔒","title":"Secure","details":"FastNet2 have built-in feature where it securing their data network to make exploiters harder to exploit it"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function r(n,o,s,d,l,c){return t(),a("div")}const p=e(i,[["render",r]]);export{h as __pageData,p as default};

View file

@ -0,0 +1 @@
import{_ as e,o as t,c as a}from"./chunks/framework.419948d5.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"FastNet2","text":"A incredible and power networking module for roblox games.","actions":[{"theme":"brand","text":"Get Started","link":"/guide/"},{"theme":"alt","text":"API Reference","link":"/api/1.0/server"},{"theme":"alt","text":"View on Github","link":"https://github.com/imezx/FastNet2"}]},"features":[{"icon":"⚡","title":"Performance","details":"FastNet2 is very-fast with high performance networking, only use a single remote event to reduce bandwidth usage and increase performance gain."},{"icon":"🍃","title":"Lightweight","details":"FastNet2 is a lightweight module for roblox games"},{"icon":"📊","title":"Task","details":"FastNet2 been optimized for a game that have heavy usage and require optimizations"},{"icon":"🔒","title":"Secure","details":"FastNet2 have built-in feature where it securing their data network to make exploiters harder to exploit it"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function r(n,o,s,d,l,c){return t(),a("div")}const p=e(i,[["render",r]]);export{h as __pageData,p as default};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more