aboutsummaryrefslogtreecommitdiffstats
path: root/teleterm-web/src/protocol.rs
blob: 4cbedf26a1e616f811a914e0fa706a012497fede (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// it's possible we should just consider pulling the real protocol out into a
// crate or something? but ideally in a way that doesn't require pulling in
// tokio
#[derive(Clone, Debug, serde::Deserialize)]
pub(crate) enum Message {
    TerminalOutput { data: Vec<u8> },
    Disconnected,
    Resize { size: Size },
}

#[derive(Clone, Debug, serde::Deserialize)]
pub(crate) struct Session {
    pub id: String,
    pub username: String,
    pub term_type: String,
    pub size: Size,
    pub idle_time: u32,
    pub title: String,
    pub watchers: u32,
}

#[derive(Clone, Debug, serde::Deserialize)]
pub(crate) struct Size {
    pub rows: u16,
    pub cols: u16,
}