Skip to content

Commit

Permalink
Bump version 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Aug 31, 2024
1 parent c8a0f09 commit 06daa0b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Then either call [`Adapter::create`] or [`Adapter::open`] to obtain a wintun
adapter. Start a session with [`Adapter::start_session`].

## Example
```rust
use std::sync::Arc;
```rust, no_run
//Must be run as Administrator because we create network adapters
//Load the wintun dll file so that we can call the underlying C functions
Expand Down Expand Up @@ -58,7 +57,7 @@ session.send_packet(packet);
//Stop any readers blocking for data on other threads
//Only needed when a blocking reader is preventing shutdown Ie. it holds an Arc to the
//session, blocking it from being dropped
session.shutdown();
let _ = session.shutdown();
//the session is stopped on drop
//drop(session);
Expand All @@ -85,7 +84,7 @@ wintun's internal ring buffer.
wintun-bindings = { version = "0.7", features = ["async"] }
```
And simply transform your `Session` into an `AsyncSession`:
```rust
```rust, ignore
// ...
let session = adapter.start_session(MAX_RING_CAPACITY)?;
let mut reader_session = AsyncSession::from(session.clone());
Expand Down

0 comments on commit 06daa0b

Please sign in to comment.