Apache HTTPD
Classes | Macros | Functions | Variables
sockperf.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "apr.h"
#include "apr_network_io.h"
#include "apr_strings.h"

Go to the source code of this file.

Classes

struct  testSet
 
struct  testResult
 

Macros

#define MAX_ITERS   10
 
#define TEST_SIZE   1024
 

Functions

static void reportError (const char *msg, apr_status_t rv, apr_pool_t *pool)
 
static void closeConnection (apr_socket_t *sock)
 
static apr_status_t sendRecvBuffer (apr_time_t *t, const char *buf, apr_size_t size, apr_pool_t *pool)
 
static apr_status_t runTest (struct testSet *ts, struct testResult *res, apr_pool_t *pool)
 
int main (int argc, char **argv)
 

Variables

struct testSet testRuns []
 
static apr_int16_t testPort = 4747
 
static apr_sockaddr_tsockAddr = NULL
 

Macro Definition Documentation

◆ MAX_ITERS

#define MAX_ITERS   10

Definition at line 36 of file sockperf.c.

◆ TEST_SIZE

#define TEST_SIZE   1024

Definition at line 37 of file sockperf.c.

Function Documentation

◆ closeConnection()

static void closeConnection ( apr_socket_t sock)
static

Definition at line 71 of file sockperf.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 212 of file sockperf.c.

◆ reportError()

static void reportError ( const char msg,
apr_status_t  rv,
apr_pool_t pool 
)
static

Definition at line 61 of file sockperf.c.

◆ runTest()

static apr_status_t runTest ( struct testSet ts,
struct testResult res,
apr_pool_t pool 
)
static

Definition at line 182 of file sockperf.c.

◆ sendRecvBuffer()

static apr_status_t sendRecvBuffer ( apr_time_t t,
const char buf,
apr_size_t  size,
apr_pool_t pool 
)
static

< TCP

< TCP

Definition at line 77 of file sockperf.c.

Variable Documentation

◆ sockAddr

apr_sockaddr_t* sockAddr = NULL
static

Definition at line 59 of file sockperf.c.

◆ testPort

apr_int16_t testPort = 4747
static

Definition at line 58 of file sockperf.c.

◆ testRuns

struct testSet testRuns[]
Initial value:
= {
{ 'a', 1, 3 },
{ 'b', 4, 3 },
{ 'c', 16, 5 },
{ 'd', 64, 5 },
{ 'e', 256, 10 },
}