feat: pool and multiplex relay-to-relay tcp channels
This commit is contained in:
@@ -57,6 +57,30 @@ pub struct RelayForwardPrelude {
|
||||
pub initial_data: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct R2rStreamData {
|
||||
pub session_id: String,
|
||||
pub stream_id: String,
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct R2rStreamClosed {
|
||||
pub session_id: String,
|
||||
pub stream_id: String,
|
||||
pub reason: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(tag = "type", content = "data")]
|
||||
pub enum R2rFrame {
|
||||
Open(RelayForwardPrelude),
|
||||
Data(R2rStreamData),
|
||||
Close(R2rStreamClosed),
|
||||
Ping,
|
||||
Pong,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(tag = "type", content = "data")]
|
||||
pub enum ClientFrame {
|
||||
|
||||
Reference in New Issue
Block a user