Scenarios - Atlantic777/mpudp Wiki
Given user has a monitor handle
When he sends a packet
Then monitor responds with 0 if it accepted the payload
and -1 if something went wrong.
Given that monitor is initialised
When it receives user packet send request
Then request payload is buffered in TX buffer
And each request is enumerated.
Given that user tries to send packet
When monitor TX buffer is locked
Then user should wait.
Given that there is list of worker thread handles
And TX buffer is not empty
When any worker is is ready
Then it should lock the TX buffer
and it should copy data
and remove the packet from the TX buffer
Then it should unlock the TX buffer
And assign itself as busy.
Given that there is list of opened and present interfaces
When any present interface changes state
Then list of opened interfaces should change.
When a present interface appears or disappears
Then it should be added to "present" list
and if it's up it should be added to opened list.
When interface is added to the opened list
Then a worker thread should be spawned
And added to handlers list.