pub fn stream_close_send(&mut self, conn: &mut Connection, stream_id: StreamId) -> Res<()> {
        qinfo!([self], "Close the sending side for stream {}.", stream_id);
        debug_assert!(self.state.active());
        let send_stream = self
            .send_streams
            .get_mut(&stream_id)
            .ok_or(Error::InvalidStreamId)?;
        // The following function may return InvalidStreamId from the transport layer if the stream has been closed
        // already. It is ok to ignore it here.
        mem::drop(send_stream.close(conn));
        if send_stream.done() {
            self.remove_send_stream(stream_id, conn);
        } else if send_stream.has_data_to_send() {
            self.streams_with_pending_data.insert(stream_id);
        }
        Ok(())
    }
/// This is called when an application wants to close the sending side of a stream.
This is called when an application wants to close the sending side of a stream.
This is called when an application wants to close the sending side of a stream .
pub fn stream_close_send(&mut self, conn: &mut Connection, stream_id: StreamId) -> Res<()> {
        qinfo!([self], "Close the sending side for stream {}.", stream_id);
        debug_assert!(self.state.active());
        let send_stream = self
            .send_streams
            .get_mut(&stream_id)
            .ok_or(Error::InvalidStreamId)?;
        // The following function may return InvalidStreamId from the transport layer if the stream has been closed
        // already. It is ok to ignore it here.
        mem::drop(send_stream.close(conn));
        if send_stream.done() {
            self.remove_send_stream(stream_id, conn);
        } else if send_stream.has_data_to_send() {
            self.streams_with_pending_data.insert(stream_id);
        }
        Ok(())
    }
pub fn stream_close_send ( & mut self , conn : & mut Connection , stream_id : StreamId ) -> Res < ( ) > { qinfo ! ( [ self ] " " stream_id ) ; debug_assert ! ( self state active ( ) ) ; let send_stream = self . send_streams . get_mut ( & stream_id ) . ok_or ( Error :: InvalidStreamId ) ? ; // The following function may return InvalidStreamId from the transport layer if the stream has been closed // already. It is ok to ignore it here. mem :: drop ( send_stream . close ( conn ) ) ; if send_stream . done ( ) { self . remove_send_stream ( stream_id , conn ) ; } else if send_stream . has_data_to_send ( ) { self . streams_with_pending_data . insert ( stream_id ) ; } Ok ( ( ) ) }
This is called when an application wants to close the sending side of a stream.
This is called when an application wants to close the sending side of a stream .
&mut self
conn
&mut Connection
stream_id
StreamId