Mercurial
comparison third_party/wrk/src/net.h @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 94705b5986b3 |
| children |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 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 */ |