libwebsockets_la_CFLAGS := -rdynamic -fPIC -Wall -Werror -std=gnu99 -pedantic -c \
-DDATADIR=\"@datadir@\" -DLWS_OPENSSL_CLIENT_CERTS=\"@clientcertdir@\"
-libwebsockets_la_LDFLAGS = -version-info 0:3
+libwebsockets_la_LDFLAGS = -lz -version-info 0:3
all: all-am
.SUFFIXES:
LWS_CALLBACK_CLEAR_MODE_POLL_FD,
(void *)(long)wsi->sock, NULL, POLLOUT);
- wsi->protocol->callback(context, wsi,
- LWS_CALLBACK_CLIENT_WRITEABLE,
- wsi->user_space,
- NULL, 0);
+ if (wsi->mode == LWS_CONNMODE_WS_CLIENT)
+ n = LWS_CALLBACK_CLIENT_WRITEABLE;
+ else
+ n = LWS_CALLBACK_SERVER_WRITEABLE;
+
+ wsi->protocol->callback(context, wsi, n, wsi->user_space, NULL, 0);
return 0;
}
LWS_CALLBACK_CLIENT_RECEIVE,
LWS_CALLBACK_CLIENT_RECEIVE_PONG,
LWS_CALLBACK_CLIENT_WRITEABLE,
+ LWS_CALLBACK_SERVER_WRITEABLE,
LWS_CALLBACK_HTTP,
LWS_CALLBACK_BROADCAST,
LWS_CALLBACK_FILTER_NETWORK_CONNECTION,
* libwebsockets_serve_http_file() makes it very
* simple to send back a file to the client.
*
- * LWS_CALLBACK_CLIENT_WRITEABLE: if you call
+ * LWS_CALLBACK_CLIENT_WRITEABLE:
+ * LWS_CALLBACK_SERVER_WRITEABLE: If you call
* libwebsocket_callback_on_writable() on a connection, you will
- * get this callback coming when the connection socket is able to
- * accept another write packet without blocking. If it already
- * was able to take another packet without blocking, you'll get
- * this callback at the next call to the service loop function.
+ * get one of these callbacks coming when the connection socket
+ * is able to accept another write packet without blocking.
+ * If it already was able to take another packet without blocking,
+ * you'll get this callback at the next call to the service loop
+ * function. Notice that CLIENTs get LWS_CALLBACK_CLIENT_WRITEABLE
+ * and servers get LWS_CALLBACK_SERVER_WRITEABLE.
*
* LWS_CALLBACK_FILTER_NETWORK_CONNECTION: called when a client connects to
* the server at network level; the connection is accepted but then