initial
This commit is contained in:
commit
ab9a0bd4e2
183 changed files with 20701 additions and 0 deletions
30
src/measurement/rpingtask.h
Normal file
30
src/measurement/rpingtask.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (c) 2018 The Swedish Internet Foundation
|
||||
// Written by Göran Andersson <initgoran@gmail.com>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "measurementtask.h"
|
||||
|
||||
class RpingTask : public MeasurementTask {
|
||||
public:
|
||||
RpingTask(const std::string &label, const std::string &ticket_string,
|
||||
const HttpHost &server,
|
||||
unsigned int no_conn = 1, unsigned int max_conn = 20,
|
||||
double duration = 25.0) :
|
||||
MeasurementTask(label, ticket_string, server,
|
||||
no_conn, max_conn, duration)
|
||||
{
|
||||
}
|
||||
void newRequest(HttpClientConnection *) override;
|
||||
bool requestComplete(HttpClientConnection *) override {
|
||||
return false;
|
||||
}
|
||||
bool websocketUpgrade(HttpClientConnection *) override;
|
||||
bool wsTextMessage(HttpConnection *conn,
|
||||
const std::string &msg) override;
|
||||
void calc_local_result();
|
||||
private:
|
||||
std::vector<double> samples;
|
||||
unsigned int max_roundtrips = 100;
|
||||
bool sent_challenge = false;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue