库

s&box 库列表

Extended Networking

extended.extendednetworking

A library that simplifies networking

关于


Extended Networking
adds RpcX-attributed RPCs for s&box with explicit who receives (RpcTarget) and who may call (RpcSender). Both are flags: you can combine several targets (e.g. host and owner) and several allowed senders (e.g. host or owner) in one attribute. That keeps sensitive logic off arbitrary clients and supports security and anti-cheat: rules are checked when sending and again on receive; bad method identity, target, caller, or arguments are rejected, and in non-DEBUG builds invalid callers are kicked. AdminSystem adds an admin list (host is always admin) for RpcTarget.Admin / RpcSender.Admin.

Admin-scoped targets integrate with AdminSystem (SteamId-based admin set, host treated as admin). Admin list can be synced to joining clients and persisted via storage helpers in that system.

Limitation:
RpcX is always reliable

Limitation: RpcX does not support generic methods yet — use non-generic RPCs only.

Future Updates: Add async Rpcs and Sync attribute

Recipient filters:
RpcX.FilterInclude / RpcX.FilterExclude 


Admin commands (
AdminSystem)

add_admin <steamId> | Add a player to the admin set.
remove_admin <steamId> | Remove from the admin set.
clear_admins | Clear all admins (host still counts as admin).
is_admin <steamId> | Log whether that Steam ID is in the admin set.
list_admins | Log all stored admin Steam IDs.
save_admins | Persist admins to storage (admins.json).
load_admins | Load admins from storage.
auto_load_admins [bool] | Read or set auto_load_admins: when enabled, admins load when the system starts.


Usage sketch

[RpcX.Broadcast(RpcSender.Host | RpcSender.Owner)]

public void HostOrOwnerMayCallEveryoneHears()
{
}

[RpcX.Broadcast(RpcSender.Admin)]

public void AdminOrHostMayCallEveryoneHears()
{
}



[RpcX(RpcTarget.Host | RpcTarget.Owner, RpcSender.Owner)]

public void OwnerCallsHostAndOwnerReceive()
{
}

using (RpcX.FilterExclude(Connection.Local))

    SomeBroadcastRpc();

更多作品,作者: extended

查看创作团队分析 →
01
Easy Json 缩略图
Easy Jsonextended.easyjson

Simplifies json reading/writing by adding some extensions methods

+024小时
1收藏
2好评
43%Terry 评分
02
Extended Box 缩略图
Extended Boxextended.extendedbox

Things that are usefull in any s&box game

+024小时
0收藏
1好评
27%Terry 评分
03
Extended Collections 缩略图
Extended Collectionsextended.extendedcollections

Some collections and extension methods for collection

+024小时
0收藏
0好评
--Terry 评分
04
Extended Editor 缩略图
Extended Editorextended.extendededitor

No summary provided.

+024小时
0收藏
0好评
--Terry 评分
05
Smarter Enum 缩略图
Smarter Enumextended.smarterenum

Smart enums that are classes just like in Java (I hate java)

+024小时
0收藏
0好评
--Terry 评分