mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-09 11:18:30 -04:00
Use tokio select for polling client socket
This commit is contained in:
parent
5ba111002f
commit
bf489900e6
2 changed files with 60 additions and 71 deletions
|
@ -14,9 +14,7 @@ impl PortPool {
|
|||
pub fn new() -> Self {
|
||||
let inner = lockfree::queue::Queue::default();
|
||||
PORT_RANGE.for_each(|p| inner.push(p) as ());
|
||||
Self {
|
||||
inner,
|
||||
}
|
||||
Self { inner }
|
||||
}
|
||||
|
||||
pub fn next(&self) -> anyhow::Result<u16> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue