fw: remove some smoltcp socket testing code
This commit is contained in:
parent
afa95aa32e
commit
3bb1134be2
@ -127,50 +127,6 @@ fn main() -> ! {
|
||||
|
||||
// TODO first connection to a socket takes a while to establish, and can time out, why?
|
||||
cmd.run(socket_set.get_mut(command_socket));
|
||||
|
||||
//if iface.poll(Instant::from_millis(now), &mut device, &mut socket_set) {
|
||||
|
||||
//let sock = socket_set.get_mut::<TcpSocket>(command_socket);
|
||||
|
||||
//if !sock.is_open() {
|
||||
// sock.listen(2000);
|
||||
//}
|
||||
|
||||
//let mut echo_tx_buf = [0u8; 32];
|
||||
//match sock.recv(|buf| {
|
||||
// if buf.len() > 0 {
|
||||
// // Copy into send buffer
|
||||
// let rd_len = core::cmp::min(buf.len(), echo_tx_buf.len());
|
||||
// &echo_tx_buf[..rd_len].copy_from_slice(&buf[..rd_len]);
|
||||
// defmt::trace!("RX data command");
|
||||
|
||||
// // Return slice to send
|
||||
// (rd_len, Some(&echo_tx_buf[..rd_len]))
|
||||
// } else {
|
||||
// (0, None)
|
||||
// }
|
||||
//}) {
|
||||
// Err(_) => {
|
||||
// // Close the socket, re-open it later
|
||||
// //sock.abort();
|
||||
// // Is doing this immediately legal?
|
||||
// //sock.listen(2000);
|
||||
// }
|
||||
// // Some data to send
|
||||
// Ok(Some(tx_data)) => {
|
||||
// match sock.send_slice(tx_data) {
|
||||
// Err(_) => {
|
||||
// //sock.abort();
|
||||
// //sock.listen(2000);
|
||||
// }
|
||||
// _ => (),
|
||||
// }
|
||||
// }
|
||||
// // No data to send
|
||||
// Ok(None) => (),
|
||||
//}
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user