mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
9884019963
- Implementing a async non-io protocol crate a) no tokio / no channels b) I/O is based on abstraction Sink/Drain c) different Protocols can have a different Drain Type This allow MPSC to send its content without splitting up messages at all! It allows UDP to have internal extra frames to care for security It allows better abstraction for tests Allows benchmarks on the mpsc variant Custom Handshakes to allow sth like Quic protocol easily - reduce the participant managers to 4: channel creations, send, recv and shutdown. keeping the `mut data` in one manager removes the need for all RwLocks. reducing complexity and parallel access problems - more strategic participant shutdown. first send. then wait for remote side to notice recv stop, then remote side will stop send, then local side can stop recv. - metrics are internally abstracted to fit protocol and network layer - in this commit network/protocol tests work and network tests work someway, veloren compiles but does not work - handshake compatible to async_std
38 lines
589 B
XML
38 lines
589 B
XML
// TODO: quick and dirty which activly waits for an ack!
|
|
/*
|
|
UDP protocol
|
|
|
|
All Good Case:
|
|
S --HEADER--> R
|
|
S --DATA--> R
|
|
S --DATA--> R
|
|
S <--FINISHED-- R
|
|
|
|
|
|
Delayed HEADER:
|
|
S --HEADER-->
|
|
S --DATA--> R // STORE IT
|
|
--HEADER--> R // apply left data and continue
|
|
S --DATA--> R
|
|
S <--FINISHED-- R
|
|
|
|
|
|
NO HEADER:
|
|
S --HEADER--> !
|
|
S --DATA--> R // STORE IT
|
|
S --DATA--> R // STORE IT
|
|
S <--MISSING_HEADER-- R // SEND AFTER 10 ms after DATA1
|
|
S --HEADER--> R
|
|
S <--FINISHED-- R
|
|
|
|
|
|
NO DATA:
|
|
S --HEADER--> R
|
|
S --DATA--> R
|
|
S --DATA--> !
|
|
S --STATUS--> R
|
|
S <--MISSING_DATA -- R
|
|
S --DATA--> R
|
|
S <--FINISHED-- R
|
|
*/
|