Function dfhack_remote::connect_to

source ·
pub fn connect_to(address: &str) -> Result<Client>
Expand description

Connect to Dwarf Fortress with a given address

§Arguments

  • address - Address of the DFHack server. By default, DFHack runs of 127.0.0.1:5000

§Examples

use dfhack_remote;
let mut dfhack = dfhack_remote::connect_to("127.0.0.1:5000").unwrap();
let df_version = dfhack.core().get_df_version().unwrap();
println!("DwarfFortress {}",  df_version);