Mercurial > hg > th-libs
comparison th_network.h @ 735:31bc1ed07cf5
Renaming BOOL->bool and TRUE/FALSE to true/false, and using stdbool.h if available.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Dec 2022 12:14:39 +0200 |
parents | 29e44a58bc73 |
children | db1a132c7754 |
comparison
equal
deleted
inserted
replaced
734:2ae1045f6c18 | 735:31bc1ed07cf5 |
---|---|
12 | 12 |
13 #include "th_datastruct.h" | 13 #include "th_datastruct.h" |
14 | 14 |
15 | 15 |
16 #ifdef TH_PLAT_WINDOWS | 16 #ifdef TH_PLAT_WINDOWS |
17 # define __OBJC_BOOL // A nasty hack | 17 # define __OBJC_bool // A nasty hack |
18 # include <windows.h> | 18 # include <windows.h> |
19 # include <winsock.h> | 19 # include <winsock.h> |
20 typedef uint16_t in_port_t; | 20 typedef uint16_t in_port_t; |
21 typedef uint32_t in_addr_t; | 21 typedef uint32_t in_addr_t; |
22 #else | 22 #else |
155 void th_conn_reset(th_conn_t *); | 155 void th_conn_reset(th_conn_t *); |
156 | 156 |
157 int th_conn_pull(th_conn_t *); | 157 int th_conn_pull(th_conn_t *); |
158 int th_conn_send_buf(th_conn_t *, const void *buf, const size_t len); | 158 int th_conn_send_buf(th_conn_t *, const void *buf, const size_t len); |
159 int th_conn_send_growbuf(th_conn_t *, th_growbuf_t *buf); | 159 int th_conn_send_growbuf(th_conn_t *, th_growbuf_t *buf); |
160 BOOL th_conn_check(th_conn_t *); | 160 bool th_conn_check(th_conn_t *); |
161 | 161 |
162 | 162 |
163 BOOL th_conn_buf_check(th_conn_t *conn, size_t n); | 163 bool th_conn_buf_check(th_conn_t *conn, size_t n); |
164 BOOL th_conn_buf_skip(th_conn_t *conn, size_t n); | 164 bool th_conn_buf_skip(th_conn_t *conn, size_t n); |
165 int th_conn_buf_strncmp(th_conn_t *conn, const char *str, const size_t n); | 165 int th_conn_buf_strncmp(th_conn_t *conn, const char *str, const size_t n); |
166 int th_conn_buf_strcmp(th_conn_t *conn, const char *str); | 166 int th_conn_buf_strcmp(th_conn_t *conn, const char *str); |
167 char * th_conn_buf_strstr(th_conn_t *conn, const char *str); | 167 char * th_conn_buf_strstr(th_conn_t *conn, const char *str); |
168 | 168 |
169 void th_conn_dump_buffer(FILE *f, th_conn_t *conn); | 169 void th_conn_dump_buffer(FILE *f, th_conn_t *conn); |