---
title: "NetKit - s&box library"
description: "The missing layer between s&box's raw networking API and your gameplay code. Every common networking task in one line."
canonical: "https://sbox.watch/zh-cn/libraries/calloway/netkit/"
generated_at: "2026-11-27T12:35:25.230Z"
---

# NetKit

The missing layer between s&box's raw networking API and your gameplay code. Every common networking task in one line.

- 类型: 库
- 标识符: calloway.netkit
- 创作者: calloway
- 规范地址: https://sbox.watch/zh-cn/libraries/calloway/netkit/
- Markdown: https://sbox.watch/zh-cn/libraries/calloway/netkit/index.md
- sbox.game: https://sbox.game/calloway/netkit/
- 生成时间: 2026-11-27T12:35:25.230Z

## 统计

- 24小时热度: +0
- Terry 评分: 60%
- 收藏: 4
- 好评: 4
- 差评: 0
- 更新时间: 2026年4月10日
- 创建时间: 2026年4月10日
- 大小: 777.7 KB
- 文件: 17
- 标签: async, client, cooldown, events, framework, gamemode, library, multiplayer

## 描述

NetKit - Networking primitives for s&box. Every common multiplayer networking task in one line.
What's included:

NetRequest - Async request/response over RPCs. Client awaits a typed response from the host. No more fire-and-forget.
NetChannel - Typed event bus. Push events to specific clients or broadcast to all. No more JSON + FilterInclude ceremony.
NetCooldown - Shared per-player cooldowns with client-side countdown. No more per-feature TimeSince fields.
NetTransaction - Optimistic client prediction. Apply changes instantly, rollback if the host rejects.
NetState<T> - Replicated state machines. Synced enum with transition events, timing, and previous-state tracking.
NetVisibility - Declarative network visibility. Distance-based, owner-only, or custom filter. Drop the component and configure.

Why NetKit?
s&box gives you the building blocks: RPCs, Sync, NetList. But every time I made something new, I had to rebuild the same patterns on top: request/response, event broadcasting, cooldowns, rate limiting. NetKit is the missing layer. Drop it in, make your life easier.

Quick example:

Register a handler on the host:
NetRequest.Handle<BuyReq, BuyRes>((caller, req) => new BuyRes { Success = true });
Client sends and awaits:
var res = await NetRequest.Ask<BuyReq, BuyRes>(new BuyReq { ItemId = "sword" });
No boilerplate RPCs. No JSON serialization. No request ID management. Typed, async, one line.

Support: Discord - callowayisweird
Source: github.com/CallowayIsWeird/netkit
