Mercurial
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/third_party/wrk/src/net.h Fri Jan 23 22:38:59 2026 -0800 @@ -0,0 +1,29 @@ +#ifndef NET_H +#define NET_H + +#include "config.h" +#include <stdint.h> +#include <openssl/ssl.h> +#include "wrk.h" + +typedef enum { + OK, + ERROR, + RETRY +} status; + +struct sock { + status ( *connect)(connection *, char *); + status ( *close)(connection *); + status ( *read)(connection *, size_t *); + status ( *write)(connection *, char *, size_t, size_t *); + size_t (*readable)(connection *); +}; + +status sock_connect(connection *, char *); +status sock_close(connection *); +status sock_read(connection *, size_t *); +status sock_write(connection *, char *, size_t, size_t *); +size_t sock_readable(connection *); + +#endif /* NET_H */