Data frame (#50)
* Rename DataFlag -> DataFlags * Polish Data frame API
This commit is contained in:
		| @@ -362,7 +362,7 @@ impl<B, P> Prioritize<B, P> | ||||
|                 let mut stream = store.resolve(key); | ||||
|  | ||||
|                 if eos { | ||||
|                     frame.set_end_stream(); | ||||
|                     frame.set_end_stream(true); | ||||
|                 } | ||||
|  | ||||
|                 self.push_back_frame(frame.into(), &mut stream); | ||||
| @@ -470,7 +470,7 @@ impl<B, P> Prioritize<B, P> | ||||
|                             let eos = frame.is_end_stream(); | ||||
|  | ||||
|                             if frame.payload().remaining() > len { | ||||
|                                 frame.unset_end_stream(); | ||||
|                                 frame.set_end_stream(false); | ||||
|                             } | ||||
|  | ||||
|                             Frame::Data(frame.map(|buf| { | ||||
|   | ||||
| @@ -390,7 +390,7 @@ impl<B, P> StreamRef<B, P> | ||||
|     where B: Buf, | ||||
|           P: Peer, | ||||
| { | ||||
|     pub fn send_data(&mut self, data: B, end_of_stream: bool) | ||||
|     pub fn send_data(&mut self, data: B, end_stream: bool) | ||||
|         -> Result<(), UserError> | ||||
|     { | ||||
|         let mut me = self.inner.lock().unwrap(); | ||||
| @@ -399,7 +399,8 @@ impl<B, P> StreamRef<B, P> | ||||
|         let stream = me.store.resolve(self.key); | ||||
|  | ||||
|         // Create the data frame | ||||
|         let frame = frame::Data::from_buf(stream.id, data, end_of_stream); | ||||
|         let mut frame = frame::Data::new(stream.id, data); | ||||
|         frame.set_end_stream(end_stream); | ||||
|  | ||||
|         me.actions.transition(stream, |actions, stream| { | ||||
|             // Send the data frame | ||||
|   | ||||
		Reference in New Issue
	
	Block a user