#async #smoltcp #tokio

tokio-smoltcp

An asynchronous wrapper for smoltcp

21 releases

0.4.1 Aug 15, 2023
0.4.0 Aug 9, 2023
0.3.1 Jan 22, 2023
0.2.4 Jan 17, 2023
0.1.14 Jun 21, 2021

#285 in Asynchronous

Download history 97/week @ 2023-08-01 38/week @ 2023-08-08 49/week @ 2023-08-15 38/week @ 2023-08-22 23/week @ 2023-08-29 39/week @ 2023-09-05 32/week @ 2023-09-19 9/week @ 2023-09-26 2/week @ 2023-10-03 1/week @ 2023-10-10 5/week @ 2023-10-17 13/week @ 2023-10-24 33/week @ 2023-10-31 34/week @ 2023-11-07 2/week @ 2023-11-14

84 downloads per month

MIT/Apache

42KB
1K SLoC

tokio-smoltcp

A async wrapper for smoltcp.

Note

v0.1.x does not follow semver, the API may change at any time.

Example

See examples/pcap.rs.

cargo build --example pcap && sudo ./target/debug/examples/pcap -h

This example uses pcap as backend and do the following things:

  1. Bind a UDP port and send a DNS request to 114.114.114.114:53 and get the www.baidu.com's IP.
  2. Create a TcpStream and send a simple HTTP/1.0 request, then print the HTTP response.
  3. Create a echo server listening to 0.0.0.0:12345, accept incoming connections and send the data back.

lib.rs:

An asynchronous wrapper for smoltcp.

Dependencies

~6–12MB
~127K SLoC