Skip to content

Commit

Permalink
Merge pull request #215 from jstnlef/0.3.0-release-prep
Browse files Browse the repository at this point in the history
0.3.0 release prep
  • Loading branch information
jstnlef committed Jun 29, 2019
2 parents be852f1 + 4185b46 commit 3376802
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 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 = "laminar"
version = "0.2.3"
version = "0.3.0"
authors = [
"Lucio Franco <luciofranco14@gmail.com>",
"Fletcher Haynes <fletcher@capitalprawn.com>",
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Add the laminar package to your `Cargo.toml` file.

```toml
[dependencies]
laminar = "0.2.3"
laminar = "0.3.0"
```

### Useful Links
Expand All @@ -90,7 +90,8 @@ _Send packets_
use laminar::{Socket, Packet};

// create the socket
let (mut socket, packet_sender, _) = Socket::bind("127.0.0.1:12345")?;
let mut socket = Socket::bind("127.0.0.1:12345")?;
let packet_sender = socket.get_packet_sender();
// this will start the socket, which will start a poll mechanism to receive and send messages.
let _thread = thread::spawn(move || socket.start_polling());

Expand Down Expand Up @@ -119,12 +120,13 @@ _Receive Packets_
use laminar::{SocketEvent, Socket};

// create the socket
let (mut socket, _, packet_receiver) = Socket::bind("127.0.0.1:12346")?;
let socket = Socket::bind("127.0.0.1:12346")?;
let event_receiver = socket.get_event_receiver();
// this will start the socket, which will start a poll mechanism to receive and send messages.
let _thread = thread::spawn(move || socket.start_polling());

// wait until a socket event occurs
let result = packet_receiver.recv();
let result = event_receiver.recv();

match result {
Ok(socket_event) => {
Expand Down
10 changes: 9 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Change Log
This document contains information about the releases of this crate.
## [0.2.3] - 2019-16-13
## [0.3.0] - 2019-06-29
- Moved the packet sender and event receiver into socket struct
- Exposed internal SocketAddr
- Introduced a new method to manually step through the polling loop
- Added a number of #[derive(Debug)] lines to Socket and member types
- Implemented basic DoS mitigation
- Added a customizable sleep to the polling loop. Defaults to 1ms

## [0.2.3] - 2019-06-13
- Remove error 'WouldBlock'

## [0.2.2] - 2019-05-06
Expand Down

0 comments on commit 3376802

Please sign in to comment.