public int req_connect_gate() { Bit_Buffer buffer = new Bit_Buffer(); buffer.write_string(account_); buffer.write_string(token_); end_point_.send_to_server(Msg.REQ_CONNECT_GATE, buffer); return(0); }
public int req_create_role() { Random ran = new Random(); Bit_Buffer buffer = new Bit_Buffer(); buffer.write_string(account_); buffer.write_string(account_); buffer.write_uint((uint)ran.Next(0, 2), 1); buffer.write_uint((uint)ran.Next(0, 3), 2); end_point_.send_to_server(Msg.REQ_CREATE_ROLE, buffer); return(0); }
public void req_select_gate() { Bit_Buffer buffer = new Bit_Buffer(); buffer.write_string(account_); end_point_.send_to_server(Msg.REQ_SELECT_GATE, buffer); }
public int req_role_list() { Bit_Buffer buffer = new Bit_Buffer(); buffer.write_string(account_); end_point_.send_to_server(Msg.REQ_ROLE_LIST, buffer); return(0); }
private int set_arg_buffer(Field_Info info, Bit_Buffer buffer, JValue value) { if (info.field_type == "int") { int val = int.Parse(value.ToString()); buffer.write_int(val, info.field_bit); } else if (info.field_type == "uint") { uint val = uint.Parse(value.ToString()); buffer.write_uint(val, info.field_bit); } else if (info.field_type == "int64") { long val = long.Parse(value.ToString()); buffer.write_int64(val); } else if (info.field_type == "uint64") { ulong val = ulong.Parse(value.ToString()); buffer.write_uint64(val); } else if (info.field_type == "float") { float val = float.Parse(value.ToString()); buffer.write_decimal(val, 32); } else if (info.field_type == "bool") { bool val = bool.Parse(value.ToString()); buffer.write_bool(val); } else if (info.field_type == "string") { string val = value.ToString(); buffer.write_string(val); } return(0); }