initial strucutre layed out

This commit is contained in:
Dominik Maier 2021-04-29 12:26:44 +02:00
parent 10c1ce9d66
commit f9e4e7cbf0

View File

@ -125,11 +125,25 @@ static mut GLOBAL_SIGHANDLER_STATE: LlmpBrokerSignalHandler = LlmpBrokerSignalHa
/// TAGs used thorughout llmp /// TAGs used thorughout llmp
pub type Tag = u32; pub type Tag = u32;
/// This is for the server the broker will spawn.
/// If an llmp connection is local - use sharedmaps /// If an llmp connection is local - use sharedmaps
/// or remote (broker2broker) - forwarded via tcp /// or remote (broker2broker) - forwarded via tcp
pub enum TcpConnectionType { pub enum TcpRequest {
LocalClient {}, LocalClientHello { shmem: ShMemDescription },
RemoteBroker, RemoteBrokerHello,
RemoteNewMessage { tag: Tag, payload: Vec<u8> },
}
/// Responses for requests to the server.
pub enum TcpResponse {
LocalClientAccepted {
client_id: u32,
shmem: ShMemDescription,
},
RemoteBrokerAccepted {
broker_id: u32,
hostname: String,
},
} }
/// Abstraction for listeners /// Abstraction for listeners