Skip to content

Commit

Permalink
update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
b23r0 committed May 5, 2022
1 parent 1984695 commit efc7ebe
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 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 = "rust-raknet"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
authors = ["b23r0 <b23r0@foxmail.com>"]
description = "RakNet Protocol implementation by Rust."
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ async fn serve(){
if buf[0] == 0xfe{
//do something
}
socket.close().await.unwrap();
}
}

Expand All @@ -69,7 +68,6 @@ async fn connect(){
if buf[0] == 0xfe{
//do something
}
socket.close().await.unwrap();
}
```

Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
//! if buf[0] == 0xfe{
//! //do something
//! }
//! socket.close().await.unwrap();
//! }
//! }
//!
Expand All @@ -66,7 +65,6 @@
//! if buf[0] == 0xfe{
//! //do something
//! }
//! socket.close().await.unwrap();
//! }
//! ```

Expand Down
10 changes: 0 additions & 10 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ impl RaknetSocket {
/// if buf[0] == 0xfe{
/// //do something
/// }
/// socket.close().await.unwarp(); // you need to manually close raknet connection
/// ```
pub async fn connect(addr : &SocketAddr) -> Result<Self>{

Expand Down Expand Up @@ -541,15 +540,6 @@ impl RaknetSocket {
}

/// Close Raknet Socket
///
/// The Raknet Socket needs to be closed manually, and if no valid data packets are received for more than 1 minute, the Raknet connection will be closed automatically.
/// This method can be called repeatedly.
///
/// # Example
/// ```ignore
/// let mut socket = RaknetSocket::connect("127.0.0.1:19132".parse().unwrap()).await.unwrap();
/// socket.close().await.unwarp();
/// ```
async fn close(&mut self) -> Result<()>{

if self.connected.load(Ordering::Relaxed){
Expand Down

0 comments on commit efc7ebe

Please sign in to comment.