Expand description
BauServer is a TCP server protocol for BauBot. Because fuck HTTP. Protect the connection yourself, ideally through dockerized containers or fork a TLS wrapper I’ll be happy to merge.
Transactions shoud follow the following pattern:
- BauClient opens a connection to BauServer
- BauClient sends a payload that is serializable into a BauMessage. BauClient itself
checks the payload to make sure it can be transmitted.
- BauClient rejects the request if it cannot be correctly serialized.
- BauServer constructs a BauMessage and sends that to BauBot
- BauServer rejects the request if it cannot be correctly de-serialized.
- BauBot broadcasts the BauMessage to the appropriate BauMessage::recipients
- (only if response requested) BauBot polls the BauMessage::recipients for a response
- (only if response requested) BauBot receives the BauResponse and pipes it back to the BauServer
- (only if response requested) BauServer notifies the BauClient through a BauServerResponseSender that we received a response.
- (only if response requested) BauClient polls the BauServerResponseReceiver and obtains the BauServerResponse.
- [net::TcpStream] is closed, signifying the end of the transaction.
Re-exports§
pub use prelude::types::*;
Modules§
- Prelude definitiions