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 5fff646
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wintun-bindings"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
authors = [
"ssrlive",
Expand Down
11 changes: 5 additions & 6 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 @@ -73,8 +72,8 @@ file.
## Features

- `panic_on_unsent_packets`: Panics if a send packet is dropped without being sent. Useful for
debugging packet issues because unsent packets that are dropped without being sent hold up
wintun's internal ring buffer.
debugging packet issues because unsent packets that are dropped without being sent hold up
wintun's internal ring buffer.

- `verify_binary_signature`: Verifies the signature of the wintun dll file before loading it.

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
1 change: 1 addition & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ fn MAKELANGID(p: u32, s: u32) -> u32 {
}

/// Returns a a human readable error message from a windows error code
#[doc(hidden)]
pub fn format_message(error_code: u32) -> Result<String, BoxError> {
let buf: *mut u16 = std::ptr::null_mut();

Expand Down

0 comments on commit 5fff646

Please sign in to comment.