#include "vfer_accept_queue.h"
Go to the source code of this file.
Functions | |
| accept_queue * | Accept_Queue_Create (int backlog) |
| void | Accept_Queue_Delete (accept_queue *ac) |
| queued_conn * | Accept_Queue_Dequeue (accept_queue *ac) |
| int | Accept_Queue_Enqueue (accept_queue *ac, int fd, struct sockaddr sa, packet *request) |
Implemented with blocking in mind, the Dequeue function blocks if the queue is empty and wakes up when something appears in the queue
Definition in file vfer_accept_queue.c.
| accept_queue* Accept_Queue_Create | ( | int | backlog | ) |
Creates the accept queue structure and initializes the data members.
| backlog | the max number of connection to queue in this queue. backlog > 0 right now there is no limit on the size of the backlog |
Definition at line 44 of file vfer_accept_queue.c.
| void Accept_Queue_Delete | ( | accept_queue * | ac | ) |
Deletes the accept queue structure.
| ac | accept_queue pointer |
Definition at line 64 of file vfer_accept_queue.c.
| queued_conn* Accept_Queue_Dequeue | ( | accept_queue * | ac | ) |
Removes and returns a queued connection from the front of the queue.
This function does not block.
| ac | accept queue pointer from which we dequeu |
Definition at line 159 of file vfer_accept_queue.c.
| int Accept_Queue_Enqueue | ( | accept_queue * | ac, | |
| int | fd, | |||
| struct sockaddr | sa, | |||
| packet * | request | |||
| ) |
Adds a queued connection to a queue.
If the queue is full, then we merely wrap around and overwrite old connections
| ac | accept_queue pointer to which we are trying to enqueue the connection | |
| fd | the file descriptor of the open connection | |
| sa | the socke address strucutre describing the remote connection | |
| request | request packet associated with the new connection |
Definition at line 92 of file vfer_accept_queue.c.
1.4.7