net_backend_protocol
Shared message types for net_backend_server:
plain Rust + serde, usable from any Rust client.
The server and its clients import the same types, so both sides agree on every request, answer and push message, and on the exact JSON they become. A mismatch is a compile error instead of a runtime surprise. The crate contains only data types and pure helpers (serde + serde_json, and zeroize to wipe the secret types); a client library or the server sends them. The JSON on the wire is the real contract: clients in other languages speak it directly; this crate is the convenience for Rust and the single source of truth.
How clients use this
This crate defines what is said; a client library decides how it is sent.
| Your client is… | Use |
|---|---|
| a Rust app | this crate + net_backend_client for the connection. |
| a Bevy game | this crate + bevy_net_backend for the connection (with the optional bevy_net_backend feature, the types plug straight into its WebSocket requests, and every HTTP route is a typed call there too). |
| other Rust code | this crate + any HTTP / WebSocket library (for example reqwest, ureq, tokio-tungstenite). |
| not Rust | the HTTP / WebSocket API directly: API.md (plus the server's OpenAPI and AsyncAPI documents), with the same JSON. |
Contents
- How clients use this
- What is inside
- Features
- Install
- Quick start: a client
- Quick start: a server
- The WebSocket envelope
- HTTP routes
- Typed HTTP calls (HttpCall)
- Errors
- Accounts and sessions
- Storage (saves)
- Files
- Chat
- Leaderboards
- Notifications
- Friends
- Groups
- Lobbies
- Matchmaking
- Ids, timestamps, pages
- Versioning and compatibility
- Optional integration with bevy_net_backend
- API design rules
- Testing
- FAQ
- License
- Contributing
What is inside
| Module | What |
|---|---|
envelope |
The WebSocket frames: WsRequestFrame, WsResponseFrame, WsPushFrame, first-message WsAuth, WsAuthOk, the decoders WsServerFrame / WsClientFrame, CloseCode, the traits WsCall (request kind → answer type) and ServerPush, Ack. |
error |
ApiError { code, message, details }, the HTTP body ErrorBody, the stable codes, ValidationDetails, http_status_for. |
ids, time, page |
UserId, RoomId, MessageId, NotificationId, GroupId, LobbyId, TicketId, FileId (i64), UnixMillis (i64 milliseconds), cursor pagination (PageRequest, Page<T>, Cursor). |
auth |
Register, login, Steam login, refresh, logout, account, email verification, password reset; TokenPair; redacted Password, AccessToken, RefreshToken, Secret. |
admin |
Operator routes: list / inspect accounts (AdminUser), ban (BanRequest, BanInfo), revoke sessions, roles, the audit log (AuditEntry, AuditQuery), a user's storage (AdminPutObject). |
storage |
Per-user key-value objects (save slots): put / get / list / delete / batch with optimistic versions; a visibility (ObjectVisibility: private / public / friends) and reads of other players' objects (GetPlayerObject, ListPlayerObjects). |
files |
Players' binary files: FileInfo, FileVisibility (private / public / friends / shared), FileMeta (the upload's JSON part), UpdateFile, FileQuery, FileUsage, the calls ListFiles, GetFileUsage, GetFile, EditFile, DeleteFile; the part names UPLOAD_META_PART / UPLOAD_FILE_PART, name_problem, is_valid_content_type, is_sha256_hex. |
chat |
Rooms, direct messages, join / leave / send / history / members, the pushes chat.message, chat.deleted and chat.presence, message deletion; message editing (EditMessage, chat.edited), read markers and unread counts (MarkRead, ListReceipts, UnreadQuery, chat.read), typing (SetTyping, chat.typing), rooms created by players (CreateRoom, RoomRole, RoomVisibility, the room calls, chat.room). |
leaderboards |
Boards (BoardInfo: ScoreMode, ScoreOrder, Period with its reset times), SubmitScore / ScoreAck, the top (LeaderboardPage), the caller's rank (MyRank) and the ranks around it. |
notifications |
Notification (also the notify.new push), NotificationQuery, CountNotifications / NotificationCount, MarkNotifications / MarkAck, DeleteNotification: each a WebSocket request and an HTTP call. |
groups |
GroupInfo, GroupRole, GroupMember, GroupInvite, GroupList, CreateGroup, UpdateGroup, GroupQuery, Invitee, RoleChange and the calls (ListGroups, MyGroups, GetGroup, EditGroup, DeleteGroup, ListGroupMembers, JoinGroup, LeaveGroup, InviteToGroup, AcceptGroupInvite, DeclineGroupInvite, RevokeGroupInvite, KickMember, SetMemberRole, TransferGroup). |
lobbies |
LobbyInfo (LobbyVisibility, LobbyState, LobbyMember), LobbyCode (text and number forms), CreateLobby, UpdateLobby, LobbySearch (LobbyFilter), SetReady, LobbyPlayer, JoinLobbyByCode, the pushes LobbyMemberUpdate / LobbyUpdate and the calls (MyLobbies, GetLobby, EditLobby, JoinLobby, LeaveLobby, SetLobbyReady, NewLobbyCode, TransferLobby, KickFromLobby). |
matchmaking |
QueueInfo / Queues, CreateTicket, MatchTicket (TicketStatus), the pushes MatchFound / TicketExpired and the calls (ListQueues, GetTicket, CancelTicket). |
friends |
FriendEntry (FriendState), AddFriend (by id, name or code), AcceptFriend, DeclineFriend, CancelFriendRequest, RemoveFriend, BlockUser / UnblockUser, the lists (ListFriends, ListFriendRequests, ListBlocks), FriendCode, FriendsHeartbeat, the friends.presence push (FriendPresence), normalize_friend_code; the Steam ID lookup SteamMatch → SteamMatchResult (SteamPlayer), parse_steam_id, is_individual_steam_id, the settings GetFriendSettings / UpdateFriendSettings → FriendSettings. |
oauth |
OpenID Connect logins: OAuthToken (an identity provider's ID token + the nonce of the sign-in) and the call OAuthLogin (POST /v1/auth/oauth/{provider} → AuthSession). |
http_call |
HttpCall (route + payload + answer type of every HTTP route), PathParams, PayloadKind, NoPayload. |
text |
The character rules behind validate(): control, invisible and direction-changing characters. |
kinds, routes |
Every WebSocket type and every /v1 HTTP path as constants (plus a route table). |
version |
PROTOCOL_VERSION, PROTOCOL_HEADER, ServerInfo. |
Features
| Feature | Default | What |
|---|---|---|
| (none) | yes | serde, serde_json and zeroize only. |
bevy_net_backend |
no | Implements the client crate bevy_net_backend's WsRequest / WsPushMessage for this crate's WebSocket messages and its Credentials for AccessToken, and adds the bevy module: every HttpCall as a typed request of that client. Brings that crate and its dependencies; a server never enables it. |
Install
[]
= { = "0.2.0" }
# With the optional client integration:
# net_backend_protocol = { version = "0.2.0", features = ["bevy_net_backend"] }
Rust 1.95 or newer.
Quick start: a client
Build a request, read whatever the server sends back:
use ;
use ;
// First message on a fresh socket (if the handshake carried no `Authorization` header).
let auth = new.to_message;
assert!;
// A request: {"id":1,"type":"chat.send","data":{"room":12,"text":"hello"}}
let request = call;
let text = to_string.unwrap;
assert_eq!;
let _join = call;
// Whatever the server sends: an answer, a push, auth.ok or auth.failed.
let incoming = r#"{"type":"chat.message","data":{"id":981,"room":12,"sender":42,"text":"hi","sent_at":1790000000000}}"#;
match parse.unwrap
Quick start: a server
Decode a client frame, route by kind, answer:
use ;
use ;
let reply = handle.unwrap;
assert!;
let refused = handle.unwrap;
assert_eq!;
let malformed = handle.unwrap;
assert!;
assert_eq!;
The WebSocket envelope
JSON objects in text frames, compatible with the default envelope (JsonEnvelope) of the client
crate bevy_net_backend:
| Direction | Frame | JSON |
|---|---|---|
| client → server | request | {"id":7,"type":"chat.send","data":{…}} |
| server → client | answer | {"id":7,"ok":true,"data":{…}} or {"id":7,"ok":false,"error":{"code":…,"message":…}} |
| server → client | push | {"type":"chat.message","data":{…}} |
| client → server | first-message auth | {"type":"auth","data":{"token":"…","protocol":1}} |
| server → client | auth accepted | {"type":"auth.ok","data":{"user_id":42,"protocol":1}} |
| server → client | auth refused | {"type":"auth.failed","error":{…}}, then close 4001 |
idis an unsigned 64-bit JSON number, echoed unchanged.- A frame with a numeric
idand (anokfield or notype) is an answer; a missingokmeanstrue, a missingdatameansnull. Anything else with atypeis a push or an auth result. A push never has anokfield, and the server never puts anidon a push. - Key order inside an object carries no meaning.
- A malformed request that has a usable
idis still answered (bad_request,FrameError::id/FrameError::answer); only frames without one cannot be answered. - Authentication:
Authorization: Bearer <access token>on the handshake (a bad token is refused with HTTP 401 before the upgrade, an expired one with 401token_expired), or the first-messageauthwithin 5 seconds (AUTH_TIMEOUT_SECS; otherwise close 1008). - Every
authmessage gets exactly oneauth.okorauth.failed, also on a socket already authenticated by its header. A laterauthre-authenticates an open socket with a fresh token; a token of another user is refused (auth.failed, close 4001).auth.failedis a definitive refusal; a temporary server failure instead closes with 1013 without an answer (the client reconnects and tries again). - An open socket survives the expiry of its access token; only a revocation closes it (4001, or
4003 for a ban). Client recipe: refresh shortly before expiry (
ACCESS_TOKEN_REFRESH_MARGIN_SECS); after aDisconnectedwith a handshake 401 or close 4001, refresh once and connect again (if the refresh is refused, log in again). - Messages are at most 1 MiB (
MAX_MESSAGE_BYTES) in both directions.
Close codes (CloseCode). Clients reconnect after every code except 4000–4099:
| Code | Name | Meaning |
|---|---|---|
| 1000 | NORMAL |
normal closure |
| 1001 | GOING_AWAY |
server shutdown or redeploy: reconnect |
| 1008 | POLICY_VIOLATION |
rate limit, no authentication in time, malformed traffic |
| 1009 | MESSAGE_TOO_BIG |
a message over 1 MiB |
| 1011 | INTERNAL_ERROR |
unexpected server error: reconnect |
| 1013 | TRY_AGAIN_LATER |
overloaded, or the connection could not keep up: reconnect later |
| 4001 | UNAUTHORIZED |
authentication refused or revoked (logout, password change): log in again |
| 4003 | BANNED |
the account is banned |
| 4009 | REPLACED |
replaced by a newer connection of the same user or session (e.g. over the server's per-user connection cap) |
| 4010 | UNSUPPORTED_PROTOCOL |
the client's protocol version is not supported |
WebSocket kinds (kinds): auth, auth.ok, auth.failed; chat chat.join, chat.leave,
chat.send, chat.history, chat.members, chat.edit, chat.mark_read, chat.receipts,
chat.unread, chat.set_typing and the pushes chat.message, chat.deleted, chat.presence,
chat.edited, chat.read, chat.typing, chat.room; notifications notify.list, notify.count,
notify.mark, notify.delete and the push notify.new; the pushes friends.presence,
lobby.member, lobby.changed, match.found and match.expired.
HTTP routes
Everything versioned is under /v1 (routes::PREFIX). "auth" = Authorization: Bearer <access token>;
"admin" = the token of an account with the admin role (admin::ADMIN_ROLE).
| Method | Path | Auth | Body → answer |
|---|---|---|---|
| GET | /v1/info |
no | → ServerInfo |
| POST | /v1/auth/register |
no | RegisterRequest → AuthSession |
| POST | /v1/auth/login |
no | LoginRequest → AuthSession |
| POST | /v1/auth/steam |
no | SteamLoginRequest → AuthSession |
| POST | /v1/auth/oauth/{provider} |
no (a Bearer token of a recent login links) | OAuthToken → AuthSession |
| POST | /v1/auth/refresh |
no | RefreshRequest → TokenPair |
| POST | /v1/auth/logout |
auth or refresh_token in the body |
LogoutRequest → Ack |
| POST | /v1/auth/email/verify |
no | VerifyEmailRequest → Ack |
| POST | /v1/auth/email/resend |
auth | (none) → Ack |
| POST | /v1/auth/password/forgot |
no | ForgotPasswordRequest → Ack (always) |
| POST | /v1/auth/password/reset |
no | ResetPasswordRequest → Ack |
| GET | /v1/account |
auth | → Account |
| PATCH | /v1/account |
auth | UpdateAccountRequest → Account |
| POST | /v1/account/password |
auth | ChangePasswordRequest → Ack |
| DELETE | /v1/account/identities/{provider} |
auth (recent login) | → Ack (unlink a provider) |
| GET | /v1/storage/{collection} |
auth | query PageRequest → Page<StorageObjectInfo> (no values) |
| GET | /v1/storage/{collection}/{key} |
auth | → StorageObject |
| PUT | /v1/storage/{collection}/{key} |
auth | PutObject → ObjectAck |
| DELETE | /v1/storage/{collection}/{key} |
auth | query DeleteObject → Ack |
| POST | /v1/storage/_batch/get |
auth | BatchGet → BatchObjects |
| POST | /v1/storage/_batch/put |
auth | BatchPut → BatchAcks |
| GET | /v1/users/{user}/storage/{collection} |
auth | query PageRequest → Page<StorageObjectInfo> (another player's objects the caller may read) |
| GET | /v1/users/{user}/storage/{collection}/{key} |
auth | → StorageObject (public, or friends for the owner's friends) |
| GET | /v1/chat/rooms |
auth | query PageRequest → Page<RoomInfo> |
| GET | /v1/chat/rooms/{room}/messages |
auth | query PageRequest → Page<ChatMessage> |
| DELETE | /v1/chat/rooms/{room}/messages/{message} |
auth (its sender or a moderator) | → Ack (the room gets chat.deleted) |
| POST | /v1/chat/dm |
auth | OpenDirect → RoomInfo |
| GET | /v1/chat/dms |
auth | query PageRequest → Page<RoomInfo> (the caller's DMs, with peer) |
| PATCH | /v1/chat/rooms/{room}/messages/{message} |
auth (its sender in the edit window, or a moderator) | MessageEdit → ChatMessage (the room gets chat.edited) |
| PUT | /v1/chat/rooms/{room}/read |
auth | ReadUpTo → Ack (the read marker) |
| GET | /v1/chat/rooms/{room}/receipts |
auth (members) | → ReadReceipts |
| POST | /v1/chat/unread |
auth | UnreadQuery → UnreadCounts |
| POST | /v1/chat/rooms |
auth | CreateRoom → RoomInfo (a player room) |
| GET | /v1/chat/rooms/mine |
auth | query PageRequest → Page<RoomInfo> (the caller's player rooms and invitations) |
| GET | /v1/chat/rooms/public |
auth | query PageRequest → Page<RoomInfo> (public player rooms) |
| GET | /v1/chat/rooms/{room} |
auth | → RoomInfo |
| PATCH | /v1/chat/rooms/{room} |
auth (owner, moderators) | UpdateRoom → RoomInfo |
| DELETE | /v1/chat/rooms/{room} |
auth (owner) | → Ack |
| POST | /v1/chat/rooms/{room}/join |
auth | → RoomInfo (become a member, or accept an invitation) |
| POST | /v1/chat/rooms/{room}/leave |
auth | → Ack |
| GET | /v1/chat/rooms/{room}/members |
auth (members) | query PageRequest → Page<RoomMembership> |
| POST | /v1/chat/rooms/{room}/invites |
auth (owner, moderators) | RoomUser → Ack |
| DELETE | /v1/chat/rooms/{room}/members/{user} |
auth (owner, moderators) | → Ack (a kick: banned until invited again) |
| PUT | /v1/chat/rooms/{room}/members/{user}/role |
auth (owner) | RoomRoleChange → Ack |
| POST | /v1/chat/rooms/{room}/owner |
auth (owner) | RoomUser → Ack |
| GET | /v1/leaderboards |
auth | → Boards |
| GET | /v1/leaderboards/{board} |
auth | query TopQuery (cursor, limit, at) → LeaderboardPage (best first) |
| POST | /v1/leaderboards/{board}/scores |
auth | SubmitScore → ScoreAck |
| GET | /v1/leaderboards/{board}/me |
auth | query RankQuery (at) → MyRank |
| GET | /v1/leaderboards/{board}/around |
auth | query AroundQuery (above, below, at) → LeaderboardPage |
| GET | /v1/notifications |
auth | query NotificationQuery (cursor, limit, unread_only) → Page<Notification> (newest first) |
| GET | /v1/notifications/count |
auth | → NotificationCount |
| POST | /v1/notifications/mark |
auth | MarkNotifications → MarkAck |
| DELETE | /v1/notifications/{id} |
auth | → Ack |
| GET | /v1/friends |
auth | query PageRequest → Page<FriendEntry> (with the online state) |
| DELETE | /v1/friends/{user} |
auth | → Ack |
| GET | /v1/friends/requests |
auth | query RequestQuery (direction, cursor, limit) → Page<FriendEntry> |
| POST | /v1/friends/requests |
auth | AddFriend → FriendEntry |
| DELETE | /v1/friends/requests/{user} |
auth | → Ack |
| POST | /v1/friends/requests/{user}/accept |
auth | → FriendEntry |
| POST | /v1/friends/requests/{user}/decline |
auth | → Ack |
| GET | /v1/friends/blocks |
auth | query PageRequest → Page<FriendEntry> |
| PUT / DELETE | /v1/friends/blocks/{user} |
auth | → Ack (block / unblock) |
| GET / POST | /v1/friends/code |
auth | → FriendCode (the code / a new one) |
| POST | /v1/friends/presence |
auth | → Ack (online heartbeat) |
| POST | /v1/friends/steam |
auth | SteamMatch → SteamMatchResult (Steam IDs → accounts here) |
| GET / PUT | /v1/friends/settings |
auth | → FriendSettings / UpdateFriendSettings → FriendSettings |
| GET / POST | /v1/groups |
auth | query GroupQuery (query, cursor, limit) → Page<GroupInfo>; CreateGroup → GroupInfo |
| GET | /v1/groups/mine |
auth | → GroupList |
| GET | /v1/groups/invites |
auth | query PageRequest → Page<GroupInvite> |
| GET / PATCH / DELETE | /v1/groups/{group} |
auth | → GroupInfo; UpdateGroup → GroupInfo; → Ack |
| GET | /v1/groups/{group}/members |
auth | query PageRequest → Page<GroupMember> |
| POST | /v1/groups/{group}/join, /leave |
auth | → GroupInfo, Ack |
| POST | /v1/groups/{group}/invites |
auth | Invitee → Ack |
| POST | /v1/groups/{group}/invites/accept, /decline |
auth | → GroupInfo, Ack |
| DELETE | /v1/groups/{group}/invites/{user}, /v1/groups/{group}/members/{user} |
auth | → Ack |
| PUT | /v1/groups/{group}/members/{user}/role |
auth | RoleChange → Ack |
| POST | /v1/groups/{group}/transfer |
auth | Invitee → Ack |
| POST | /v1/lobbies |
auth | CreateLobby → LobbyInfo |
| GET | /v1/lobbies/mine |
auth | → LobbyList |
| POST | /v1/lobbies/search |
auth | LobbySearch → Page<LobbyInfo> |
| POST | /v1/lobbies/join |
auth | JoinLobbyByCode → LobbyInfo |
| GET / PATCH | /v1/lobbies/{lobby} |
auth | → LobbyInfo; UpdateLobby → LobbyInfo (host) |
| POST | /v1/lobbies/{lobby}/join, /leave |
auth | → LobbyInfo, Ack |
| PUT | /v1/lobbies/{lobby}/ready |
auth | SetReady → Ack |
| POST | /v1/lobbies/{lobby}/code |
auth | → LobbyInfo (host: a new join code) |
| POST | /v1/lobbies/{lobby}/host |
auth | LobbyPlayer → Ack (host) |
| DELETE | /v1/lobbies/{lobby}/members/{user} |
auth | → Ack (host) |
| GET | /v1/matchmaking/queues |
auth | → Queues |
| POST / GET / DELETE | /v1/matchmaking/ticket |
auth | CreateTicket → MatchTicket; → MatchTicket; → Ack |
| POST | /v1/files |
auth | multipart/form-data: meta (JSON FileMeta, optional, first) + file (the bytes) → FileInfo (in routes::BINARY) |
| GET | /v1/files |
auth | query FileQuery (owner, cursor, limit) → Page<FileInfo> |
| GET | /v1/files/usage |
auth | → FileUsage |
| GET / PATCH / DELETE | /v1/files/{file} |
auth | → FileInfo; UpdateFile → FileInfo (owner); → Ack (owner) |
| GET | /v1/files/{file}/content |
auth | → the bytes (in routes::BINARY) |
| GET | /v1/admin/users |
admin | query UserListQuery (q, cursor, limit) → Page<AdminUser> |
| GET | /v1/admin/users/{user} |
admin | → AdminUser |
| POST | /v1/admin/users/{user}/ban |
admin | BanRequest → Ack (sessions revoked, sockets close 4003) |
| POST | /v1/admin/users/{user}/unban |
admin | (none) → Ack |
| DELETE | /v1/admin/users/{user}/sessions |
admin | → Ack (every session revoked) |
| DELETE | /v1/admin/users/{user}/identities/{provider} |
admin | → Ack (unlink a provider) |
| PUT / DELETE | /v1/admin/users/{user}/roles/{role} |
admin | → Ack (grant / revoke) |
| GET | /v1/admin/audit |
admin | query AuditQuery (user, action, cursor, limit) → Page<AuditEntry> |
| GET | /v1/admin/users/{user}/storage/{collection} |
admin | query PageRequest → Page<StorageObjectInfo> |
| GET | /v1/admin/users/{user}/storage/{collection}/{key} |
admin | → StorageObject |
| PUT | /v1/admin/users/{user}/storage/{collection}/{key} |
admin | AdminPutObject (may set write) → ObjectAck |
| DELETE | /v1/admin/users/{user}/storage/{collection}/{key} |
admin | query DeleteObject → Ack |
| GET (upgrade) | /v1/ws |
header or first message | the WebSocket |
Unversioned: /healthz (liveness) and /readyz (readiness). routes::ALL holds the table as data
(method, path, auth; Route::new builds entries for your own routes); every route has an
HttpCall type, and routes::storage_object_path and friends fill in
path parameters. Request body limits: 64 KiB for JSON routes
(routes::DEFAULT_BODY_LIMIT_BYTES), 272 KiB for a storage PUT, 4.06 MiB for a batch put; every
answer stays far below the 10 MiB bevy_net_backend accepts by default.
Typed HTTP calls (HttpCall)
HttpCall is the HTTP twin of WsCall: a request type knows its route (method, path template,
whether a Bearer token is needed), its payload (a JSON body, a query string, or nothing) and its
answer type. Every route of routes::ALL has exactly one HttpCall type (a golden test checks
it), and the server mounts its handlers from the same types, so client and server cannot drift.
- Routes without path parameters use their body / query type directly:
LoginRequest,RegisterRequest,BatchGet,BatchPut,OpenDirect,UserListQuery,AuditQuery, …. - Routes with path parameters (or without a payload) have a small call type:
GetObject,WriteObject(itsPutObjectbody),RemoveObject,ListObjects,ListMessages,DeleteMessage,ListRooms,ListDirects,GetAccount,ResendVerification,UnlinkIdentity,GetServerInfo, and inadminGetUser,BanUser,UnbanUser,RevokeSessions,UnlinkUserIdentity,GrantRole,RevokeRole,ListUserObjects,GetUserObject,WriteUserObject,RemoveUserObject. They are not wire types: what travels is the path, the payload and the answer.
A client sends C::ROUTE.method to call.path() with call.payload() as JSON
(PayloadKind::Json), as the query (PayloadKind::Query) or nothing (PayloadKind::Empty), plus
the Bearer token when C::ROUTE.auth; a 2xx answer decodes as C::Response, every error as
ErrorBody:
use ;
use ;
let put = new;
assert_eq!;
assert!;
assert_eq!;
assert_eq!;
let body = to_string.unwrap; // {"value":{"level":3},"if_version":2}
assert!;
// The answer type is part of the call: `GetObject` answers a `StorageObject`.
let object: StorageObject = ;
assert_eq!;
// Only path-safe values are sent: a name that would need escaping gives no path.
assert_eq!;
A server rebuilds a call from what it received with C::from_parts(&path_params, payload), which
checks the parameters' shape (an id that is not a number, an invalid name: bad_request). Your
own routes can have HttpCall types too (Route::new(HttpMethod::Get, "/v1/game/…", true);
net_backend_server enforces the auth flag: no valid token, no handler).
PathParams, is_path_safe (RFC 3986 path characters that need no escaping: letters, digits,
- . _ ~ ! $ & ' ( ) * + , ; = : @), http_call::placeholders and http_call::query_pairs (a
Query payload as name / value pairs for your HTTP library; absent fields are left out, never
sent as null) are the helpers.
Errors
Every error is an ApiError: a stable code, a human-readable message, optional details.
Over HTTP the body is {"error":{…}} (ErrorBody); over WebSocket it is the error of an
answer or of auth.failed.
use ;
let body: ErrorBody = from_str
.unwrap;
assert!;
let fields: ValidationDetails = body.error.details_as.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
Codes (codes): bad_request 400, validation_failed 422, unauthorized 401, forbidden 403,
token_expired 401, not_found 404, method_not_allowed 405, unsupported_media_type 415, conflict 409, version_conflict 409, payload_too_large 413, rate_limited
429, quota_exceeded 403, unknown_type (WebSocket only), unsupported_protocol 400,
invalid_credentials 401, refresh_token_reused 401, email_taken 409, email_not_verified
403, invalid_token 400, banned 403, reauthentication_required 403, steam_auth_failed 401, oauth_failed 401, room_full 409, not_a_member
403, hook_timeout 503, unavailable 503, internal 500. Codes never change meaning; server
modules and games may add their own, so treat an unknown code like its HTTP status.
unsupported_protocol is 400 on plain HTTP routes only (see versioning). email_taken tells that
an address has an account: a deliberate trade-off for a clear sign-up answer, bounded by rate limits.
Accounts and sessions
Register or log in (email + password, or a Steam Web API ticket) and get an AuthSession: the
Account and a TokenPair. The access token lives 1 hour by default
(DEFAULT_ACCESS_TOKEN_TTL_SECS), the refresh token 30 days (DEFAULT_REFRESH_TOKEN_TTL_SECS);
a server may configure both. Refresh tokens rotate: each works once. Presenting the same
refresh token again within 30 seconds of its first use (REFRESH_REUSE_GRACE_SECS: an HTTP retry,
two systems refreshing at once) answers the same new pair; a later reuse revokes the whole session
(refresh_token_reused). Refresh single-flight anyway and keep the old pair until the new one is
stored. Logout takes the Bearer token or, when it already expired, the refresh token in the body.
use ;
let register = new.with_display_name;
assert!; // the same rules the server applies
assert!;
// Secrets never show in Debug output (but do serialize: they must reach the server).
let login = new;
assert!;
let tokens: TokenPair = from_str
.unwrap;
assert_eq!;
Rules shared by both sides: passwords 10 characters to 128 bytes, no control characters, not only
whitespace; emails up to 254 bytes (shape only: the server normalises them and sends a verification
mail); display names up to 32 characters, trimmed. Emails must be a plain local@domain
(auth::is_valid_email): display names, angle brackets, comments, quoted local parts and address
literals are refused, so a server never re-parses an address with a lenient mail parser. Emails
and display names refuse control characters and invisible or direction-changing characters (bidi
controls, zero-width characters, BOM: net_backend_protocol::text), which would allow
impersonation. Steam tickets up to 8192 hex characters (Steam's buffer is 2560 bytes = 5120 hex).
Password-reset requests always answer the same way, whether or not the address has an account. Steam: the game sends the hex ticket from GetAuthTicketForWebApi with
its identity string; the server checks it with Steam and creates the account on the first login.
OpenID Connect (a server with the oauth module): the game signs the player in at the provider
(Google, or another provider the server is configured for), gets the provider's ID token and sends
it with the nonce of that sign-in as OAuthLogin; the server checks the token and answers an
AuthSession. The provider account becomes a LinkedIdentity (provider = the server's name for
the provider). With the Bearer token of a recent login the same call links the provider account
instead; unlinking is UnlinkIdentity.
use ;
use HttpCall;
let login = new;
assert!;
assert_eq!;
assert!; // the token never shows in Debug
Storage (saves)
Objects live at (owner, collection, key) and hold one JSON value; every route addresses the
caller's own objects. Every write bumps the object's ObjectVersion (1 for a new object). The
default is last write wins. A write that names the version it expects (if_version) gets 409
version_conflict with {"current_version":N} (VersionConflict; for a batch also "index":i,
the failing item) if the stored one differs, and nothing changes: only then two devices cannot
silently overwrite each other's save. The server also honours If-Match: "N" / If-None-Match: *
on single-object PUT and DELETE and sends an ETag with every object it returns or writes (GET,
PUT; not on DELETE). Deleting an object that does not exist answers Ack (unless if_version is
given).
use ;
use routes;
let put = from_serialize.unwrap.if_version;
assert!;
assert_eq!;
assert_eq!;
assert_eq!; // not a valid name
let _create_only = new.if_absent; // only if it does not exist
Names: 1–128 bytes of ASCII letters, digits, _, -, ., starting with a letter or digit
(storage::is_valid_name). Defaults: 256 KiB per value, 1000 objects per user. Batches: at most 16
distinct objects (MAX_BATCH) and 4 MiB of values (MAX_BATCH_BYTES), all or nothing; a batch
read over 4 MiB is refused with 413. Collection listings return StorageObjectInfo (version, size,
time, no value), so a page stays small. write is owner or server: only server-side game code
sets server, and clients then get 403 on writes. visibility (ObjectVisibility) is private
(the default), public or friends: PutObject::with_visibility sets it, a write without it keeps
the stored one, and GetPlayerObject / ListPlayerObjects read another player's objects the caller
may read (404 / left out otherwise). Binary data: the files module (below), or a string you
encode yourself (e.g. base64, +33 %, which counts against the size limit).
Files
A server with the files module keeps players' binary files. The upload and the download carry
bytes, not JSON, so they have no HttpCall (routes::BINARY); everything else is typed.
use ;
use ;
// The upload's `meta` part (JSON), sent before the `file` part.
let meta = new.with_name.shared_with;
assert!;
assert_eq!;
// Another player's readable files; a change of the settings.
assert_eq!;
let _public = new.with_visibility;
assert_eq!;
FileVisibility: private (the owner), public (every logged-in player), friends (the owner's
friends), shared (the accounts in shared_with). FileInfo.sha256 is the lower-case hex SHA-256
of the bytes (the download's ETag); FileMeta::with_sha256 makes the server check the upload.
Names: 1–255 bytes without slashes or control / invisible characters (files::name_problem);
content types: a plain type/subtype (files::is_valid_content_type).
Chat
Joining, leaving, sending, history and live messages go over the WebSocket; the room list, history pages and opening a direct-message room are also HTTP routes.
| Kind | Request → answer |
|---|---|
chat.join |
JoinRoom → RoomInfo (by id {"room":12} or public key {"room":"world"}) |
chat.leave |
LeaveRoom → Ack |
chat.send |
SendMessage → SendAck |
chat.history |
ChatHistory → Page<ChatMessage> (newest first) |
push chat.message |
ChatMessage, to every member, the sender included |
push chat.deleted |
MessageDeleted (moderation) |
chat.members |
ListMembers → RoomMembers (who is online: each user once, up to 200 listed, the total count; a DM room lists only the caller: a DM never reveals the peer's online state) |
push chat.presence |
Presence (joined / left, with the user's name and the room's online count) |
chat.edit |
EditMessage → ChatMessage (the edited message, with edited_at) |
push chat.edited |
MessageEdited |
chat.mark_read |
MarkRead → Ack (the caller's read marker; forward only) |
push chat.read |
ReadReceipt (a member's marker moved; DM, group and player rooms; coalesced) |
chat.receipts |
ListReceipts → ReadReceipts |
chat.unread |
UnreadQuery → UnreadCounts (up to 100 rooms, counts stop at 1000) |
chat.set_typing |
SetTyping → Ack (never stored) |
push chat.typing |
TypingUpdate (throttled; a client drops it after expires_in_ms) |
push chat.room |
RoomUpdate (a player room changed: RoomChange) |
Public and group rooms: membership lasts as long as the connection; after a reconnect, join
again. Direct messages need no join: their chat.message goes to every open connection of
both members, and GET /v1/chat/dms lists the caller's DM rooms (RoomInfo::peer). The sender
gets its own chat.message too (the final text after server hooks, also on its other devices); the
SendAck answer comes first, games dedupe by message_id, and an optional nonce on
SendMessage, echoed in the push, matches a send whose answer was lost (in a public or group room
the other members' pushes carry it too, so use a random value; in a DM and in the history only the
sender sees it). Text: line breaks and tabs are allowed; other control characters and invisible /
direction-changing characters are refused (zero-width joiners stay allowed for emoji), a text must
show something (not only spaces, joiners, tags or marks), and at most 8 combining marks may stack. Room keys: 1–64 bytes of a-z, 0-9, _ - ..
ChatHistory is WebSocket-only; over HTTP the room is in the path and the page in the query.
Defaults (a server may configure others): 500 characters per message, a send rate per user of a
burst of 5 messages, then one every 2 seconds (5 per 10 s as a token bucket; rate_limited carries
retry_after_ms), 30 days of history, 200 connections per public room, 16 joined rooms per
connection. Public rooms are capped on
purpose: one huge room multiplies every message by its member count.
Presence: when a user's first connection joins a room, the room's members (the joiner's own
connections too) get chat.presence joined; when its last one leaves (or disconnects), left.
It is best effort on purpose: rooms with more online users than the server's presence cap
(DEFAULT_PRESENCE_MAX_MEMBERS, 100) get none, and a burst beyond the per-room rate
(DEFAULT_PRESENCE_PER_SECOND, 10) is not pushed; chat.members always answers the current list.
Deleting a message (DELETE /v1/chat/rooms/{room}/messages/{message}, its sender or a
moderator) pushes chat.deleted and removes it from the history.
Editing (EditMessage, over the WebSocket or HTTP): the sender within the server's edit window
(DEFAULT_EDIT_WINDOW_SECS, 900) or a moderator; the room gets chat.edited, and the history shows
the latest text with ChatMessage::edited_at. Read markers (MarkRead: "read up to message X",
forward only) feed UnreadQuery; in DM, group and player rooms the members get ReadReceipt pushes
and ListReceipts answers the current markers. Typing (SetTyping) is never stored; a
TypingUpdate carries how long to show it.
Rooms created by players (RoomKind::Player): CreateRoom (a name, RoomVisibility public or
private) makes the caller the owner. Public rooms are listed (PublicRooms) and open to anyone not
banned; private rooms take invited players. Membership is stored: JoinChatRoom (or a chat.join)
makes the caller a member and accepts an invitation, LeaveChatRoom ends it. Roles (RoomRole):
the owner renames, changes the visibility, sets roles (SetRoomRole), hands the room on
(TransferRoom) and deletes it (DeleteRoom); moderators rename (EditRoom), invite
(InviteToRoom), kick (KickFromRoom: banned until invited again) and delete messages in the room.
MyRooms lists the caller's rooms and invitations with its role, ListRoomMembers the rows of a
room (RoomMembership). Every change is a RoomUpdate push (chat.room).
use ;
use ;
let create = new.public;
assert_eq!;
let invite = new;
assert_eq!;
// The same request over the WebSocket and over HTTP.
let edit = new;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
Leaderboards
The server configures its boards; players submit scores (PostScore with a SubmitScore) and read
them (ListBoards, GetLeaderboard, GetMyRank, GetAroundMe). A board (BoardInfo) has a key
(1–64 bytes of a-z, 0-9, _ - .; leaderboards::is_valid_board_key), a ScoreMode (best
keeps the better score, latest replaces it, sum adds to it), a ScoreOrder (desc: higher is
better; asc: lower is better) and a Period (all_time, daily, weekly: resets at 00:00 UTC,
weeks on Monday). Period::start_of / end_of compute a period's bounds; every read takes at, a
time inside the period to show.
use ;
use ;
let submit = new;
assert_eq!;
let around = new.with_query;
assert_eq!;
// The week of 2026-10-02 started on Monday 2026-09-28 at 00:00 UTC.
assert_eq!;
Ranks (LeaderboardEntry::rank) start at 1 and are unique: equal scores rank by who reached the
score first (achieved_at), then by the lower account id. ScoreAck says the stored score, the
submitted one (after the server's hooks), whether the stored score changed and the rank. A board
with client_submit: false takes scores from the server's own code only (players get 403). A score
is any i64 except i64::MIN; metadata is a small JSON value (DEFAULT_MAX_METADATA_BYTES, 1 KiB,
unless the server configures another). AroundQuery asks for up to MAX_AROUND (50) entries above
and below the caller (default DEFAULT_AROUND, 5).
Notifications
The server stores notifications per player (a reward, an invitation, a system notice) and pushes
each new one as notify.new to the player's open connections. Only the server creates them; a
player reads, marks and deletes their own, over the WebSocket or HTTP (same answers):
| Kind | Request → answer | HTTP |
|---|---|---|
push notify.new |
Notification |
|
notify.list |
NotificationQuery → Page<Notification> (newest first) |
GET /v1/notifications |
notify.count |
CountNotifications → NotificationCount (unread, total) |
GET /v1/notifications/count |
notify.mark |
MarkNotifications → MarkAck (changed, unread) |
POST /v1/notifications/mark |
notify.delete |
DeleteNotification → Ack |
DELETE /v1/notifications/{id} |
use ;
use ;
let unread = new.unread_only;
assert_eq!;
assert_eq!;
let mark = read;
assert!;
assert_eq!;
assert!;
A Notification has its id, the game's kind (1–64 bytes of a-z, 0-9, _ . : -, starting
with a letter; notifications::is_valid_kind), an optional text (at most MAX_TEXT_CHARS, 1000,
with the chat text rules), optional data (JSON; DEFAULT_MAX_DATA_BYTES, 4 KiB, unless the server
configures another), the sender account if any, created_at and read. MarkNotifications names
1 to MAX_MARK_IDS (100) distinct ids or all; ids of other players are skipped. A client that was
offline lists what it missed (unread_only); while connected it gets notify.new.
Friends
Friends by account. A player sends a request by account id, display name or friend code
(AddFriend); the other accepts (AcceptFriend) or declines (DeclineFriend); the sender may
withdraw it (CancelFriendRequest); either ends the friendship (RemoveFriend). BlockUser ends a
friendship and every open request between the two, and refuses the blocked player's requests. Every
entry is a FriendEntry (user, name, state: friend / sent / received / blocked,
since; for friends online and last_seen). HTTP only, plus one push:
| Push | Data |
|---|---|
friends.presence |
FriendPresence (user, online, last_seen), to the player's friends when it comes online or goes offline |
use ;
use HttpCall;
let add = by_code;
assert!;
assert_eq!;
assert_eq!;
let sent = sent.with_query;
assert_eq!;
A friend code is 8 characters of FRIEND_CODE_ALPHABET (2-9, A-Z without O and I); case,
spaces and dashes do not matter when it is typed in (normalize_friend_code). A name is matched
exactly against display names, which are not unique: several matches answer 409 conflict. A
friend is online while it has a WebSocket connection, or for the server's online window (90 s by
default) after its last FriendsHeartbeat.
Steam IDs: on a server with Steam login, a player who linked a Steam account sends Steam IDs,
e.g. its Steam friends list (SteamMatch), and gets the ones that belong to accounts there
(SteamMatchResult: SteamPlayer with steam_id, user, name, and state when the caller
already relates to that player). Steam IDs travel as decimal strings (parse_steam_id: an
individual SteamID64, no sign, spaces or leading zeros); a SteamID64 is larger than the integers a
JSON number carries exactly. Players who turned FriendSettings::steam_findable off
(UpdateFriendSettings) are never found; it is on by default.
use ;
use HttpCall;
let lookup = new;
assert!;
assert_eq!;
assert_eq!;
assert_eq!;
let hide = new.steam_findable;
assert_eq!;
Groups
Groups (guilds, clans). A player creates one (CreateGroup) and owns it; others join by invitation
(InviteToGroup, then AcceptGroupInvite or DeclineGroupInvite) or directly when it is open
(JoinGroup). Roles (GroupRole): the owner, admins (change the group, invite, remove members) and
members; SetMemberRole and TransferGroup are the owner's. HTTP only.
use ;
use ;
let create = new.with_description.open;
assert!;
assert!;
let clear = new;
assert_eq!;
let promote = new;
assert_eq!;
A GroupInfo has the name (3 to MAX_GROUP_NAME_CHARS, 32, characters; unique on the server
without regard to case), an optional description (MAX_DESCRIPTION_CHARS, 500), open, the game's
metadata (JSON; DEFAULT_MAX_METADATA_BYTES, 2 KiB, unless the server configures another), the
owner, the member count and the server's max_members, the group's chat_room (when the server
runs the chat module) and the caller's role when it is a member. In an UpdateGroup, an empty
description removes it and a present "metadata":null removes the metadata.
Lobbies
Lobbies (lobbies): a player creates one (CreateLobby) and hosts it; others join by id
(JoinLobby: public lobbies, or a friends-only one of a friend) or with the join code
(JoinLobbyByCode, any visibility); members set a ready flag (SetLobbyReady); the host changes
the metadata, size, visibility and state (EditLobby with an UpdateLobby), kicks
(KickFromLobby), hands the lobby over (TransferLobby) and replaces the code (NewLobbyCode).
LobbySearch lists open lobbies by metadata filters. HTTP, plus two pushes:
| Push | Data |
|---|---|
lobby.member |
LobbyMemberUpdate (lobby, change: joined / left / kicked / ready, member), to every member |
lobby.changed |
LobbyUpdate (changes: host / metadata / settings / state / code, lobby without its member list), to every member |
use ;
use ;
let create = new.with_visibility.with_meta;
assert!;
// A join code is also a number below 2^40, for platforms that carry a number.
let code = parse.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
let start = new;
assert_eq!;
assert_eq!;
let search = new.with_filter;
assert!;
A LobbyInfo has the visibility (public, private, friends), the state (open, in_game,
closed: the last lobby.changed of a lobby that is gone), the host, max_players, the member
count, the metadata (text keys of 1 to MAX_META_KEY_BYTES, 64, bytes; values of at most
MAX_META_VALUE_CHARS, 256, characters), and for members the join code in both forms (code,
code_number) and the chat_room (when the server runs the chat module); answers about one lobby
list its players (LobbyMember: user, name, ready, joined_at). A join code is 8
characters of FRIEND_CODE_ALPHABET; case, spaces and dashes do not matter when typed
(LobbyCode::parse); LobbyCode::grouped shows it as K7M2-Q9XD.
Matchmaking
Matchmaking (matchmaking): a player puts a ticket (CreateTicket: a queue and attributes the
game's rules read) into one of the server's queues (ListQueues), reads it (GetTicket: waiting,
or matched with its MatchFound) and cancels it (CancelTicket). HTTP, plus two pushes:
| Push | Data |
|---|---|
match.found |
MatchFound (ticket, queue, players, the rules' data), to each matched player |
match.expired |
TicketExpired (ticket, queue): the ticket ran out unmatched |
use ;
use HttpCall;
let ticket = new.with_attributes;
assert!;
assert_eq!;
Ids, timestamps, pages
- Ids are
i64newtypes (UserId,RoomId,MessageId,NotificationId,GroupId,LobbyId,TicketId,FileId) and travel as plain JSON numbers. Ids from outside (a SteamID64) travel as strings. - Timestamps are
UnixMillis:i64milliseconds since 1970 UTC, a plain JSON number (UnixMillis::now(),from_system_time,to_system_time). - Lists use cursor pagination:
PageRequest { cursor, limit }(default 50, at most 100) →Page<T> { items, next_cursor }; the last page has nonext_cursor. Cursors are opaque (at most 512 bytes,MAX_CURSOR_BYTES): pass them back unchanged.
Versioning and compatibility
- Routes:
/v1is stable: within/v1routes and kinds keep their names and stay. - Protocol version:
PROTOCOL_VERSION(1) identifies the set of messages within/v1. A client names the version it speaks in thex-net-backend-protocolheader (PROTOCOL_HEADER, on HTTP requests and the WebSocket handshake) or in theprotocolfield of the first-messageauth; none means 1. The server answers with its own version in the same header and inauth.ok, lists the accepted range atGET /v1/info, and refuses an unsupported version withunsupported_protocol: HTTP 400 on plain HTTP routes; on/v1/wsNEVER 400 (the client would retry it forever) but upgrade and close 4010 (version::WS_REFUSAL_CLOSE, no reconnect), or 403 before the upgrade. - Forward compatibility: unknown fields are ignored when decoding (no type uses
deny_unknown_fields), so extra fields are fine; optional fields may be absent; an unknown enum value (a room kind, a write rule) decodes asUnknown; unknown error codes and provider names are kept as text; a push kind a client does not know is still a push.
Optional integration with bevy_net_backend
With the feature bevy_net_backend, this crate's WebSocket messages implement that client's
WsRequest / WsPushMessage (same kinds, same answer types: JoinRoom, LeaveRoom, SendMessage,
ChatHistory, ListMembers, EditMessage, MarkRead, ListReceipts, UnreadQuery, SetTyping,
NotificationQuery, CountNotifications, MarkNotifications, DeleteNotification; pushes
ChatMessage, MessageDeleted, Presence, MessageEdited, ReadReceipt, TypingUpdate,
RoomUpdate, Notification, FriendPresence, LobbyMemberUpdate, LobbyUpdate, MatchFound,
TicketExpired) and AccessToken implements its
Credentials (a Bearer header on every request and WebSocket handshake). The client's default
envelope is the one above, so nothing else is needed:
use ;
app.
.
.;
// In a system: `ws: Res<WsClient>`, `credentials: ResMut<BackendCredentials>`.
credentials.set;
ws.request;
// Answers arrive as `WsResponse<RoomInfo>`, pushes as `WsPush<ChatMessage>`; a refused request is
// `BackendError::Rejected`, whose payload decodes as `ApiError` (`rejection.json::<ApiError>()`).
Every HTTP route is a typed call there as well (module net_backend_protocol::bevy):
request(&call) builds the client's OutgoingRequest exactly as net_backend_client sends the
call (C::ROUTE.method on call.path(), the payload as the JSON body or the query string,
accept: application/json and the x-net-backend-protocol header; the game's credentials only on
routes that need a token), HttpClientCalls::call(&call) sends it with the answer decoded as
C::Response, and api_error(&error) reads the protocol's ApiError out of a refused answer. A
path parameter that is missing or would need escaping is answered InvalidRequest and never sent.
use ;
use ;
app.;
// In a system: `http: Res<HttpClient>`.
http.call;
// Or adjust the request first (a timeout, a header):
http.;
// Answers arrive as `JsonResponse<LeaderboardPage>`:
match &answer.result
Add the Bevy client itself to your game with cargo add bevy_net_backend.
API design rules
- Types a client or server only reads (answers, pushes, errors) are
#[non_exhaustive]with public fields, so adding a field is not a breaking change. - Types you build (requests) are
#[non_exhaustive]too and have constructors pluswith_*builders:SendMessage::new(room, text),PutObject::new(value).if_version(v). Optional fields are set through builders, so adding one is not a breaking change. - Nothing that may hold a float (any JSON
Value) implementsEq. - Every serde attribute is explicit; JSON field names are
snake_case. - Secrets (
Password,AccessToken,RefreshToken,Secret) print<redacted>inDebug, have noDisplayand noPartialEq(compare secrets in constant time on the server). When one is dropped, its whole allocation is overwritten with zeros first (thezeroizecrate); each clone is wiped on its own. Not wiped: theStringthatinto_innerreturns, copies made withexpose().to_string()or by serializing it, and the input it was decoded from. validate()methods carry the shape rules both sides share; the server is still the authority.
Testing
The golden tests pin the exact JSON text of every envelope frame. With the feature on, the tests
run every frame through bevy_net_backend's real encoder and decoder in both directions,
check that both decoders classify the same frames the same way, and build every route's typed
call as that client's request, compared with what net_backend_client sends. CI runs fmt, clippy,
tests and docs for every feature combination on Rust 1.96.0.
FAQ
Do I need this crate to talk to the server? No. The JSON is the contract; any HTTP / WebSocket client in any language works. This crate saves Rust code from re-typing the messages.
Why i64 ids and millisecond timestamps instead of UUIDs and RFC 3339 strings? They map to
one column type on every database the server supports, sort naturally and cost nothing to parse.
Why cursors and not page numbers? Lists such as chat history grow while you page through them; an offset would skip or repeat messages, a cursor does not.
Why does chat.send not resend after a reconnect? It could post a message twice. Chat
membership also ends with the connection, so a game joins again after reconnecting.
License
Dual-licensed under MIT (LICENSE-MIT) or Apache-2.0 (LICENSE-APACHE), at your option.
Contributing
This crate lives in the net_backend repository
together with the server and the client. Issues and pull requests are welcome. Please run
cargo fmt --all, cargo clippy -p net_backend_protocol --all-targets --all-features -- -D warnings
and cargo test -p net_backend_protocol --all-features before opening a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in
the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without
any additional terms or conditions.
Website: net-backend.com · Contact: info@net-backend.com