pub fn new_server(
        node_id: NodeId,
        conn: Pin<Box<quiche::Connection>>,
        current_link: &Weak<Link>,
        router: &Rc<Router>,
    ) -> Result<Rc<Self>, Error> {
        let p = Self::new_instance(node_id, conn, Endpoint::Server, current_link, None)?;
        let (conn_stream_writer, conn_stream_reader) = p.conn.bind_id(0);
        spawn(log_errors(
            server_conn_stream(
                node_id,
                conn_stream_writer,
                conn_stream_reader,
                Rc::downgrade(router),
                Rc::downgrade(&p),
                p.conn_stats.clone(),
                p.channel_proxy_stats.clone(),
            ),
            "Server connection stream failed",
        ));
        Ok(p)
    }
/// Construct a new server peer - spawns tasks to handle responding to control stream requests
Construct a new server peer - spawns tasks to handle responding to control stream requests
Construct a new server peer - spawns tasks to handle responding to control stream requests
pub fn new_server(
        node_id: NodeId,
        conn: Pin<Box<quiche::Connection>>,
        current_link: &Weak<Link>,
        router: &Rc<Router>,
    ) -> Result<Rc<Self>, Error> {
        let p = Self::new_instance(node_id, conn, Endpoint::Server, current_link, None)?;
        let (conn_stream_writer, conn_stream_reader) = p.conn.bind_id(0);
        spawn(log_errors(
            server_conn_stream(
                node_id,
                conn_stream_writer,
                conn_stream_reader,
                Rc::downgrade(router),
                Rc::downgrade(&p),
                p.conn_stats.clone(),
                p.channel_proxy_stats.clone(),
            ),
            "Server connection stream failed",
        ));
        Ok(p)
    }
pub fn new_server ( node_id : NodeId , conn : Pin < Box < quiche :: Connection > > , current_link : & Weak < Link > , router : & Rc < Router > , ) -> Result < Rc < Self > , Error > { let p = Self :: new_instance ( node_id , conn , Endpoint :: Server , current_link , None ) ? ; let ( conn_stream_writer , conn_stream_reader ) = p . conn . bind_id ( 0 ) ; spawn ( log_errors ( server_conn_stream ( node_id , conn_stream_writer , conn_stream_reader , Rc :: downgrade ( router ) , Rc :: downgrade ( & p ) , p . conn_stats . clone ( ) , p . channel_proxy_stats . clone ( ) , ) , " " , ) ) ; Ok ( p ) }
Construct a new server peer - spawns tasks to handle responding to control stream requests
Construct a new server peer - spawns tasks to handle responding to control stream requests
node_id
NodeId
conn
Pin<Box<quiche::Connection>>
current_link
&Weak<Link>
router
&Rc<Router>
node_id
NodeId
conn
Pin<Box<quiche::Connection>>
current_link
&Weak<Link>
router
&Rc<Router>