opcua-core 0.9.1

Core components for OPC UA used by client and server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use opcua_types::{
    url::*,
};

#[test]
fn endpoint_match() {
    assert!(url_matches_except_host("opc.tcp://foo:4855/", "opc.tcp://bar:4855"));
    assert!(url_matches_except_host("opc.tcp://127.0.0.1:4855/", "opc.tcp://bar:4855"));
    assert!(url_matches_except_host("opc.tcp://foo:4855/", "opc.tcp://127.0.0.1:4855"));
    assert!(url_matches_except_host("opc.tcp://foo:4855/UAServer", "opc.tcp://127.0.0.1:4855/UAServer"));
    assert!(!url_matches_except_host("opc.tcp://foo:4855/UAServer", "opc.tcp://127.0.0.1:8888/UAServer"));
}