#include <dirent.h>
#include <openssl/rc4.h>
#include <osl.h>
+#include <stdbool.h>
#include "para.h"
#include "error.h"
dfc->fcp.slices_per_group = conf.dccp_slices_per_group_arg;
dfc->fcp.init_fec = dccp_init_fec;
dfc->fcp.send_fec = dccp_send_fec;
+ dfc->fcp.need_periodic_header = false;
dfc->fc = vss_add_fec_client(sc, &dfc->fcp);
}
#include <sys/types.h>
#include <dirent.h>
#include <osl.h>
+#include <stdbool.h>
#include "para.h"
#include "error.h"
uint8_t slices_per_group;
/** Number of slices minus number of redundant slices. */
uint8_t data_slices_per_group;
+ /** Whether the header must be sent periodically. */
+ bool need_periodic_header;
/**
* Transport-layer initialisation for FEC support.
*
#include <openssl/rc4.h>
#include <regex.h>
#include <osl.h>
+#include <stdbool.h>
#include "para.h"
#include "error.h"
#include <netinet/udp.h>
#include <net/if.h>
#include <osl.h>
+#include <stdbool.h>
#include "server.cmdline.h"
#include "para.h"
ut->fcp.data_slices_per_group = scd->data_slices_per_group;
ut->fcp.init_fec = udp_init_fec;
ut->fcp.send_fec = udp_send_fec;
+ ut->fcp.need_periodic_header = true;
sc->private_data = ut;
sc->fd = -1;
return false;
if (vsst->header_len == 0)
return false;
- if (fc->group.num && tv_diff(&fc->next_header_time, now, NULL) > 0)
- return false;
+ if (fc->group.num > 0) {
+ if (!fc->fcp->need_periodic_header)
+ return false;
+ if (tv_diff(&fc->next_header_time, now, NULL) > 0)
+ return false;
+ }
tv_add(now, &vsst->header_interval, &fc->next_header_time);
return true;
}