comparison third_party/wrk/src/net.h @ 178:94705b5986b3

[ThirdParty] Added WRK and luajit for load testing.
author MrJuneJune <me@mrjunejune.com>
date Thu, 22 Jan 2026 20:10:30 -0800
parents
children
comparison
equal deleted inserted replaced
177:24fe8ff94056 178:94705b5986b3
1 #ifndef NET_H
2 #define NET_H
3
4 #include "config.h"
5 #include <stdint.h>
6 #include <openssl/ssl.h>
7 #include "wrk.h"
8
9 typedef enum {
10 OK,
11 ERROR,
12 RETRY
13 } status;
14
15 struct sock {
16 status ( *connect)(connection *, char *);
17 status ( *close)(connection *);
18 status ( *read)(connection *, size_t *);
19 status ( *write)(connection *, char *, size_t, size_t *);
20 size_t (*readable)(connection *);
21 };
22
23 status sock_connect(connection *, char *);
24 status sock_close(connection *);
25 status sock_read(connection *, size_t *);
26 status sock_write(connection *, char *, size_t, size_t *);
27 size_t sock_readable(connection *);
28
29 #endif /* NET_H */