class_name LoginServer extends Server signal logged_in(packet: LoginServerLoginSuccessPacket) @warning_ignore("shadowed_variable") func _init(host: String, port: int = 6900) -> void: super._init(host, port) func login(username: String, password: String): var login_server_login_packet = LoginServerLoginPacket.new() login_server_login_packet.username = username login_server_login_packet.password = password peer.put_data(login_server_login_packet.to_bytes()) var packet = await received_packet if packet is LoginServerLoginSuccessPacket: print(inst_to_dict(packet)) logged_in.emit(packet)