write header

This commit is contained in:
nora 2022-03-04 23:27:34 +01:00
parent b6355f5e35
commit 3bcce76885
3 changed files with 102 additions and 3 deletions

View file

@ -148,10 +148,23 @@ impl TransportConnection {
&mut self,
channel: ChannelNum,
method: &Method,
_header: ContentHeader,
header: ContentHeader,
_body: SmallVec<[Bytes; 1]>,
) -> Result<()> {
self.send_method(channel, method).await?;
let mut header_buf = Vec::new();
frame::write_content_header(&mut header_buf, header)?;
frame::write_frame(
&Frame {
kind: FrameType::Method,
channel,
payload: header_buf.into(),
},
&mut self.stream,
)
.await?;
amqp_todo!()
}