"Fossies" - the Fresh Open Source Software Archive 
Member "wrk-4.2.0/src/net.h" (7 Feb 2021, 652 Bytes) of package /linux/www/wrk-4.2.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "net.h" see the
Fossies "Dox" file reference documentation.
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 */