diff options
| author | Weicao Mao <1992414357@qq.com> | 2025-04-22 02:09:49 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-22 02:09:49 +0800 |
| commit | 9a61a4f3d2520f657a864b931cf1b4f5c5451962 (patch) | |
| tree | 48ea97e0c5667dd6422b03198c18fd135646fb44 /core/src/constants.rs | |
| parent | aeff5141bb6efb0a94d74b9e852c2c10074360b2 (diff) | |
| parent | eb4d5568e5e4de227a5dcad28e9633baa33700b1 (diff) | |
完善 MessageEncoder
Diffstat (limited to 'core/src/constants.rs')
| -rw-r--r-- | core/src/constants.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/src/constants.rs b/core/src/constants.rs index 6257c9d..ef5a3d6 100644 --- a/core/src/constants.rs +++ b/core/src/constants.rs @@ -1,8 +1,16 @@ use bincode::config; use bincode::config::Configuration; +// 默认 Hash 加盐 pub const SALT : &str = ":)"; -pub const DEFAULT_PORT : u16 = 8916; +// 服务器默认端口 +pub const DEFAULT_PORT_UDP: u16 = 8916; +pub const DEFAULT_PORT_TCP : u16 = 8916; -pub const BINCODE_CONFIG : Configuration = config::standard();
\ No newline at end of file +// 加密 +// BinCode 2.0 默认配置 +pub const BINCODE_CONFIG : Configuration = config::standard(); + +// 加密失败时的值 +pub const BINCODE_CONVERT_FAILED : Vec<u8> = Vec::new();
\ No newline at end of file |
