rust/hedgewars-server/src/utils.rs
changeset 14804 b3adc030104b
parent 14802 01f8ab45f806
child 14824 92225a708bda
equal deleted inserted replaced
14803:50fcef24003f 14804:b3adc030104b
     1 use base64::encode;
     1 use base64::encode;
     2 use mio;
     2 use mio;
     3 use std::iter::Iterator;
     3 use std::iter::Iterator;
     4 
     4 
     5 pub const PROTOCOL_VERSION: u32 = 3;
     5 pub const SERVER_VERSION: u32 = 3;
     6 pub const SERVER_TOKEN: mio::Token = mio::Token(1_000_000_000);
     6 pub const SERVER_TOKEN: mio::Token = mio::Token(1_000_000_000);
     7 pub const IO_TOKEN: mio::Token = mio::Token(1_000_000_001);
     7 pub const IO_TOKEN: mio::Token = mio::Token(1_000_000_001);
     8 
     8 
     9 pub fn is_name_illegal(name: &str) -> bool {
     9 pub fn is_name_illegal(name: &str) -> bool {
    10     name.len() > 40
    10     name.len() > 40