Mercurial > hg > th-libs
comparison th_network.h @ 457:85fa3d333556
Actually, revert the boolean changes .. meh.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Jan 2018 23:09:29 +0200 |
parents | 347bfd3e017e |
children | e4ce60239d16 |
comparison
equal
deleted
inserted
replaced
456:1bf886fa9db5 | 457:85fa3d333556 |
---|---|
14 #include "th_datastruct.h" | 14 #include "th_datastruct.h" |
15 #include "th_util.h" | 15 #include "th_util.h" |
16 | 16 |
17 | 17 |
18 #ifdef TH_PLAT_WINDOWS | 18 #ifdef TH_PLAT_WINDOWS |
19 # define __OBJC_bool // A nasty hack | 19 # define __OBJC_BOOL // A nasty hack |
20 # include <windows.h> | 20 # include <windows.h> |
21 # include <winsock.h> | 21 # include <winsock.h> |
22 typedef uint16_t in_port_t; | 22 typedef uint16_t in_port_t; |
23 typedef uint32_t in_addr_t; | 23 typedef uint32_t in_addr_t; |
24 #else | 24 #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); |