cdns-rs 1.2.2

A native Sync/Async Rust implementation of client DNS resolver.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::net::UdpSocket;

use cdns_rs::sync::query::QDnsSockerAddr;



// run in shell `nc -u -l 44444` a "test" should be received
fn main()
{
    let udp = UdpSocket::bind("127.0.0.1:33333").unwrap();
    udp.connect(QDnsSockerAddr::resolve("localhost:44444").unwrap()).unwrap();

    udp.send("test".as_bytes()).unwrap();

    return;
}