encapsulation of net logic in core

This commit is contained in:
2026-03-26 12:13:43 +07:00
parent 6a0eafd2f5
commit cb837c08f2
12 changed files with 26 additions and 25 deletions
+3 -3
View File
@@ -16,17 +16,17 @@ use crate::{
},
};
pub struct StreamHandler {
pub(crate) struct StreamHandler {
muxer: Muxer,
role: ConnectionRole,
}
impl StreamHandler {
pub fn new(muxer: Muxer, role: ConnectionRole) -> Self {
pub(crate) fn new(muxer: Muxer, role: ConnectionRole) -> Self {
Self { muxer, role }
}
pub async fn handle(&self, frame: Frame) {
pub(crate) async fn handle(&self, frame: Frame) {
let stream_id = frame.header.stream_id;
match frame.header.frame_type {