Commit e6e59503 authored by rna's avatar rna

Refactor receiver. Add condition variable.

parent 085ff10d
This diff is collapsed.
......@@ -17,6 +17,7 @@ typedef struct prrtReceiver {
struct addrinfo *ai;
PrrtChannelStateInformation *csi;
pthread_mutex_t lock;
pthread_cond_t wait_for_space;
BBR* bbr;
......@@ -29,9 +30,6 @@ typedef struct prrtReceiver {
PrrtReceiver *PrrtReceiver_create(const char *host, uint16_t port, prrtByteCount_t mss);
bool PrrtReceiver_updateAndGenerateRateSample(PrrtReceiver *recv, prrtSequenceNumber_t seqnum, uint8_t packetType,
prrtTimestamp_t receiveTime, prrtTimedelta_t rtt);
void PrrtReceiver_add_outstanding_packet_state(PrrtReceiver *recv, PrrtPacket *packet, prrtTimestamp_t sentTime);
prrtByteCount_t PrrtReceiver_get_pipe(PrrtReceiver *recv);
void PrrtReceiver_check_rto(PrrtReceiver *recv, prrtSequenceNumber_t i, prrtPacketType_t param);
......@@ -39,9 +37,11 @@ void PrrtReceiver_check_rto(PrrtReceiver *recv, prrtSequenceNumber_t i, prrtPack
void PrrtReceiver_on_application_write(PrrtReceiver *receiver, uint32_t i, prrtSequenceNumber_t i1);
void PrrtReceiver_on_ack(PrrtReceiver *receiver, PrrtPacketFeedbackPayload * feedbackPayload, prrtTimestamp_t receiveTime, prrtTimedelta_t rtt);
void PrrtReceiver_wait_for_space(PrrtReceiver *receiver);
prrtByteCount_t PrrtReceiver_get_space(PrrtReceiver *receiver);
double PrrtReceiver_getBBRPacingRate(PrrtReceiver *receiver);
prrtDeliveryRate_t PrrtReceiver_getBBRBtlBw(PrrtReceiver *receiver);
prrtByteCount_t PrrtReceiver_getBBRCwnd(PrrtReceiver *receiver);
prrtDeliveryRate_t PrrtReceiver_get_BBR_btlDr(PrrtReceiver *receiver);
bool PrrtReceiver_destroy(PrrtReceiver *receiver);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment