Function quilkin::components::proxy::packet_router::spawn_receivers
source · pub async fn spawn_receivers(
config: Arc<Config>,
socket: Socket,
num_workers: usize,
sessions: &Arc<SessionPool>,
upstream_receiver: Receiver<(PoolBuffer, Option<IpNetEntry>, SocketAddr)>,
buffer_pool: Arc<BufferPool>
) -> Result<Vec<Arc<Notify>>>
Expand description
Spawns a background task that sits in a loop, receiving packets from the passed in socket. Each received packet is placed on a queue to be processed by a worker task. This function also spawns the set of worker tasks responsible for consuming packets off the aforementioned queue and processing them through the filter chain and session pipeline.