Skip to content

Commit 36ad659

Browse files
committed
Update example implementations.
1 parent 8523ab4 commit 36ad659

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Below is a minimal example of a custom plugin for a cluster server, based on [`r
4141

4242
```rust
4343
use sustenet::cluster::{ LOGGER, cleanup, start };
44-
use sustenet::shared::Plugin;
44+
use sustenet::shared::ServerPlugin;
4545
use tokio::io::AsyncReadExt;
4646
use tokio::sync::mpsc::Sender;
4747

@@ -82,7 +82,7 @@ impl Reia {
8282
}
8383

8484
// Plugin initialization
85-
impl Plugin for Reia {
85+
impl ServerPlugin for Reia {
8686
fn set_sender(&self, tx: Sender<Box<[u8]>>) {
8787
// Set the sender
8888
if self.sender.set(tx).is_err() {

rust/cluster/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Sustenet is a networking solution for game engines. It's made to primarily be us
2323

2424
```rs
2525
use sustenet::cluster::{ cleanup, error, start };
26-
use sustenet::shared::Plugin;
26+
use sustenet::shared::ServerPlugin;
2727
use tokio::sync::mpsc::Sender;
2828

2929
struct Reia;
30-
impl Plugin for Reia {
30+
impl ServerPlugin for Reia {
3131
fn receive(
3232
&self,
3333
tx: Sender<Box<[u8]>>,

rust/sustenet/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Below is a minimal example of a custom plugin for a cluster server, based on [`r
3535

3636
```rust
3737
use sustenet::cluster::{ LOGGER, cleanup, start };
38-
use sustenet::shared::Plugin;
38+
use sustenet::shared::ServerPlugin;
3939
use tokio::io::AsyncReadExt;
4040
use tokio::sync::mpsc::Sender;
4141

@@ -76,7 +76,7 @@ impl Reia {
7676
}
7777

7878
// Plugin initialization
79-
impl Plugin for Reia {
79+
impl ServerPlugin for Reia {
8080
fn set_sender(&self, tx: Sender<Box<[u8]>>) {
8181
// Set the sender
8282
if self.sender.set(tx).is_err() {

0 commit comments

Comments
 (0)