Skip to content

Commit

Permalink
add: server state to state block
Browse files Browse the repository at this point in the history
  • Loading branch information
justRkive committed Aug 6, 2024
1 parent b002c2b commit 6d0c288
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/async_resolver/state_block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use tokio::time::Instant;
use crate::async_resolver::server_state::ServerState;

/// This struct represent the state of information of a pending request.
///
Expand Down Expand Up @@ -26,6 +27,8 @@ pub struct StateBlock {
/// the request. If the counter reaches zero, the resolver must
/// return a response to the client.
request_global_counter: u32,

server_state: ServerState,
}

impl StateBlock {
Expand All @@ -42,6 +45,7 @@ impl StateBlock {
StateBlock {
timestamp: Instant::now(),
request_global_counter: request_global_limit,
server_state: ServerState::new(vec![]),
}
}

Expand Down

0 comments on commit 6d0c288

Please sign in to comment.