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.
&&
This example uses pcap
as backend and do the following things:
- Bind a UDP port and send a DNS request to
114.114.114.114:53
and get thewww.baidu.com
's IP. - Create a
TcpStream
and send a simple HTTP/1.0 request, then print the HTTP response. - Create a echo server listening to
0.0.0.0:12345
, accept incoming connections and send the data back.