Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.
/ libtxc Public archive

Rust интерфейс к TRANSAQ XML Connector

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

2dav/libtxc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Разработка прекращена, см. txcproxy


libtxc

TRANSAQ XML Connector API для Rust

crates.io libs.rs documentation license

libtxc позволяет использовать коннектор в программах на Rust и добавляет необходимые гарантии безопасности.

Quickstart

Cargo.toml

[dependencies]
libtxc = "0.2"

main.rs

use libtxc::{TransaqConnector, LogLevel};
use std::{error::Error, path::PathBuf};

fn main() -> Result<(), Box<dyn Error>>{
    let lib: PathBuf = /*txcn64.dll / txmlconnector64.dll path*/;
    let logdir: PathBuf = /*logs directory*/;
    let loglevel:LogLevel = LogLevel::Minimum;
    
    let mut txc = TransaqConnector::new(lib.into(), logdir.into(), loglevel)?;
    
    txc.subscribe(|buf| println!("rx: {buf}"));
    unsafe{ txc.sender().send("<command id = \"get_connector_version\"/>\0")? };
    
    std::thread::sleep(std::time::Duration::from_secs(1));
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Rust интерфейс к TRANSAQ XML Connector

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages