}
impl TxHandle {
- pub fn transmit_packet(
- &self,
- link_setup: &LinkSetup,
- packet_type: &PacketType,
- payload: &[u8],
- ) {
+ pub fn transmit_packet(&self, link_setup: &LinkSetup, packet_type: PacketType, payload: &[u8]) {
let (pack_type, pack_type_len) = packet_type.as_proto();
if pack_type_len + payload.len() > 823 {
// TODO: error for invalid transmission type
adapters.read().unwrap().packet.values().cloned().collect();
for s in subs {
s.packet_received(
- lsf.clone(),
+ LinkSetup::new_raw(lsf.clone()),
packet_type.clone(),
packet_payload.clone(),
);
let subs: Vec<_> =
adapters.read().unwrap().stream.values().cloned().collect();
for s in subs {
- s.stream_began(lsf.clone());
+ s.stream_began(LinkSetup::new_raw(lsf.clone()));
}
} else if n == 26 {
if !stream_running {