split works

This commit is contained in:
2024-06-01 12:05:24 +02:00
parent 24924ecdf2
commit fa13f3b367
5 changed files with 35 additions and 8 deletions

View File

@ -8,11 +8,11 @@ use std::{
time::Duration,
};
use libcsp_rust::{
use libcsp::{
csp_accept_guarded, csp_bind, csp_buffer_get, csp_conn_dport, csp_conn_print_table,
csp_connect_guarded, csp_iflist_print, csp_init, csp_listen, csp_ping, csp_read,
csp_read_guarded, csp_reboot, csp_route_work, csp_send, csp_service_handler, ConnectOpts,
CspSocket, MsgPriority, SocketFlags, CSP_ANY, CSP_LOOPBACK,
csp_connect_guarded, csp_iflist_print, csp_init, csp_listen, csp_ping, csp_read_guarded,
csp_reboot, csp_route_work, csp_send, csp_service_handler, ConnectOpts, CspError, CspSocket,
MsgPriority, SocketFlags, CSP_ANY, CSP_LOOPBACK,
};
const MY_SERVER_PORT: i32 = 10;
@ -38,7 +38,7 @@ fn main() -> Result<(), u32> {
}
if let Err(e) = csp_route_work() {
match e {
libcsp_rust::CspError::TimedOut => continue,
CspError::TimedOut => continue,
e => {
println!("CSP router error: {:?}", e);
break;