#include <netinet/in.h>
#include <sys/socket.h>
#include "types.h"
#include "errors.h"
Go to the source code of this file.
Defines | |
#define | ARTP_ABUFFERS_H 1 |
Functions | |
int | abuffers_init (void) |
int | abuffers_create (int id_buffer, SID_TYPE sid, struct sockaddr *sender) |
int | abuffers_destroy (int id_buffer) |
int | abuffers_add_seq (int id_buffer, SID_TYPE sid, struct sockaddr *sender, SEQ_TYPE seq, double latest_send_time, int maximal_count) |
int | abuffers_get_ack (double time, SID_TYPE *sid, struct sockaddr **receiver, char **value, int *size) |
ARTP
library for ack buffers.
|
Store incoming sequence number to relevant buffer. This function adds sequence number of incoming packet to given buffer identified by its id. If it's the first sequence number saving for this session, it inserts the pointer of this session to the right place in structure for sending ack packets (depending on its latest time to send).
|
|
Create ack buffer. This function allocates place for relevant buffer and initializes its parameters.
|
|
Destroy ack buffer. This function destroys relevant ack buffer. It unallocates place used by that buffer and makes some other clearing steps (e.g. removes this buffer from structure for sending ack packets, etc.).
|
|
Get next ack packet which should be sent. This function looks whether there's any ack packet which should be sent in specified time. If there's any it returns all information about that packet and removes related buffer from structure for sending ack packets.
|
|
Initialize ack buffers. This function doesn't include any code this time. It is defined for further purposes.
|