Skip to content

Commit

Permalink
πŸ’Š Finalize Version
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Oct 28, 2021
1 parent a3cfa8e commit 53a30c9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "afire"
version = "0.1.6"
version = "0.1.7"
authors = ["Connor Slade <connor@connorcode.com>"]
edition = "2018"

Expand Down
5 changes: 3 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# 0.1.7*
# 0.1.7
- Add Panic Message to Error Handel
- Add http.rs to move raw http parseing out of server.rs
- Start / Start Threaded returns Option
- Add .unwrap to all server.starts in examples
- Add http.rs to move raw http parsing out of server.rs
- Add optinal Socket Timeout
- Dont give up on cookie parsing if cookie header is malformed
- Add optinal Socket Timeout
- Add Socket Timeout Docs

# 0.1.6
- Add Example for Logging
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Just add the following to your `Cargo.toml`:

```toml
[dependencies]
afire = "0.1.6"
afire = "0.1.7"
```

## πŸ“„ Info
Expand Down
4 changes: 2 additions & 2 deletions lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Just add the following to your `Cargo.toml`:
```toml
[dependencies]
afire = "0.1.6"
afire = "0.1.7"
```
## πŸ“„ Info
Expand Down Expand Up @@ -81,7 +81,7 @@ server.start_threaded(8);

#![warn(missing_docs)]

pub(crate) const VERSION: &str = "0.1.7*";
pub(crate) const VERSION: &str = "0.1.7";

mod common;
mod http;
Expand Down
19 changes: 19 additions & 0 deletions lib/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,25 @@ impl Server {
.push(header);
}

/// Set the socket Read / Write Timeout
///
/// ## Example
/// ```rust
/// // Import Library
/// use std::time::Duration;
/// use afire::Server;
///
/// // Create a server for localhost on port 8080
/// let mut server: Server = Server::new("localhost", 8080);
///
/// // Set socket timeout
/// server.set_socket_timeout(Some(Duration::from_secs(1)));
///
/// // Start the server
/// // As always, this is blocking
/// # server.set_run(false);
/// server.start().unwrap();
/// ```
pub fn set_socket_timeout(&mut self, socket_timeout: Option<Duration>) {
self.socket_timeout = socket_timeout;
}
Expand Down

0 comments on commit 53a30c9

Please sign in to comment.