2021-11-16 06:09:27 +00:00
|
|
|
pub trait Server {
|
2022-02-18 18:25:54 +00:00
|
|
|
/// Initialize the server and return a number
|
|
|
|
fn initialize() -> u32;
|
2022-04-11 22:23:11 +00:00
|
|
|
|
2022-02-18 18:25:54 +00:00
|
|
|
/// kill the server
|
|
|
|
fn kill() -> bool;
|
2022-04-11 22:23:11 +00:00
|
|
|
|
2022-02-18 18:25:54 +00:00
|
|
|
// put data in the servers outbox
|
|
|
|
fn send();
|
2022-04-11 22:23:11 +00:00
|
|
|
|
2022-02-18 18:25:54 +00:00
|
|
|
// put data in the servers inbox and notify it
|
|
|
|
fn recieve();
|
2021-11-16 06:09:27 +00:00
|
|
|
}
|