Log and print error for all examples
parent
276acfb7ef
commit
3e124ef482
|
@ -108,7 +108,13 @@ fn main() {
|
||||||
let mut processed = 0;
|
let mut processed = 0;
|
||||||
while !CLIENT_DONE.load(Ordering::SeqCst) {
|
while !CLIENT_DONE.load(Ordering::SeqCst) {
|
||||||
let timestamp = Instant::now();
|
let timestamp = Instant::now();
|
||||||
iface.poll(&mut sockets, timestamp).expect("poll error");
|
match iface.poll(&mut sockets, timestamp) {
|
||||||
|
Ok(_) => {},
|
||||||
|
Err(e) => {
|
||||||
|
debug!("poll error: {}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// tcp:1234: emit data
|
// tcp:1234: emit data
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,7 +66,12 @@ fn main() {
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let timestamp = Instant::now();
|
let timestamp = Instant::now();
|
||||||
iface.poll(&mut sockets, timestamp).expect("poll error");
|
match iface.poll(&mut sockets, timestamp) {
|
||||||
|
Ok(_) => {},
|
||||||
|
Err(e) => {
|
||||||
|
debug!("poll error: {}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut socket = sockets.get::<TcpSocket>(tcp_handle);
|
let mut socket = sockets.get::<TcpSocket>(tcp_handle);
|
||||||
|
|
|
@ -121,7 +121,13 @@ fn main() {
|
||||||
let ident = 0x22b;
|
let ident = 0x22b;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
iface.poll(&mut sockets, Instant::now()).unwrap();
|
let timestamp = Instant::now();
|
||||||
|
match iface.poll(&mut sockets, timestamp) {
|
||||||
|
Ok(_) => {},
|
||||||
|
Err(e) => {
|
||||||
|
debug!("poll error: {}",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let timestamp = Instant::now();
|
let timestamp = Instant::now();
|
||||||
|
|
Loading…
Reference in New Issue