30 #if !defined(LWS_SIZEOFPTR)
31 #define LWS_SIZEOFPTR ((int)sizeof (void *))
34 #if defined(__x86_64__)
35 #define _LWS_PAD_SIZE 16
37 #define _LWS_PAD_SIZE LWS_SIZEOFPTR
39 #define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? \
40 ((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n))
42 #define LWS_PRE _LWS_PAD(4 + 10 + 2)
44 #define LWS_SEND_BUFFER_PRE_PADDING LWS_PRE
45 #define LWS_SEND_BUFFER_POST_PADDING 0
47 #define LWS_WRITE_RAW LWS_WRITE_HTTP
53 enum lws_write_protocol {
64 LWS_WRITE_CONTINUATION = 2,
75 LWS_WRITE_HTTP_FINAL = 7,
79 LWS_WRITE_HTTP_HEADERS = 8,
85 LWS_WRITE_HTTP_HEADERS_CONTINUATION = 9,
93 LWS_WRITE_BUFLIST = 0x20,
101 LWS_WRITE_NO_FIN = 0x40,
104 LWS_WRITE_H2_STREAM_END = 0x80,
109 LWS_WRITE_CLIENT_IGNORE_XOR_MASK = 0x80
121 enum lws_write_protocol wp;
225 LWS_VISIBLE LWS_EXTERN
int
226 lws_write(
struct lws *wsi,
unsigned char *buf,
size_t len,
227 enum lws_write_protocol protocol);
230 #define lws_write_http(wsi, buf, len) \
231 lws_write(wsi, (unsigned char *)(buf), len, LWS_WRITE_HTTP)
244 static LWS_INLINE
int
245 lws_write_ws_flags(
int initial,
int is_start,
int is_end)
252 r = LWS_WRITE_CONTINUATION;
255 r |= LWS_WRITE_NO_FIN;
273 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
274 lws_raw_transaction_completed(
struct lws *wsi);
Definition: lws-write.h:117