pub fn send_msg<W: ser::Writeable>(&self, t: Type, body: &W) -> Result<(), Error> {
		let mut body_data = vec![];
		try!(ser::serialize(&mut body_data, body));
		let mut data = vec![];
		try!(ser::serialize(
			&mut data,
			&MsgHeader::new(t, body_data.len() as u64),
		));
		data.append(&mut body_data);

		self.outbound_chan
			.unbounded_send(data)
			.map_err(|_| Error::ConnectionClose)
	}
/// Utility function to send any Writeable. Handles adding the header and
/// serialization.
Utility function to send any Writeable. Handles adding the header and
serialization.
Utility function to send any Writeable . Handles adding the header and serialization .
pub fn send_msg<W: ser::Writeable>(&self, t: Type, body: &W) -> Result<(), Error> {
		let mut body_data = vec![];
		try!(ser::serialize(&mut body_data, body));
		let mut data = vec![];
		try!(ser::serialize(
			&mut data,
			&MsgHeader::new(t, body_data.len() as u64),
		));
		data.append(&mut body_data);
		self.outbound_chan
			.unbounded_send(data)
			.map_err(|_| Error::ConnectionClose)
	}
pub fn send_msg < W : ser :: Writeable > ( & self , t : Type , body : & W ) -> Result < ( ) , Error > { let mut body_data = vec ! [ ] ; try ! ( ser serialize ( mut body_data body ) ) ; let mut data = vec ! [ ] ; try ! ( ser serialize ( mut data MsgHeader new ( t body_data len ( ) as u64 ) ) ) ; data . append ( & mut body_data ) ; self . outbound_chan . unbounded_send ( data ) . map_err ( | _ | Error :: ConnectionClose ) }
Utility function to send any Writeable.
Utility function to send any Writeable .
&self
t
Type
body
&W