19 #ifndef _ardour_surface_websockets_server_h_
20 #define _ardour_surface_websockets_server_h_
22 #include <unordered_map>
24 #include <libwebsockets.h>
26 #if LWS_LIBRARY_VERSION_MAJOR < 3
40 #define WEBSOCKET_LISTEN_PORT 3818
57 #if LWS_LIBRARY_VERSION_MAJOR < 3
63 struct lws_context_creation_info
_lws_info;
80 static int lws_callback (
struct lws*,
enum lws_callback_reasons,
void*,
void*,
size_t);
bool io_handler(Glib::IOCondition, lws_sockfd_type)
ServerResources _resources
int send_availsurf_hdr(Client)
LwsPollFdGlibSourceMap _fd_ctx
struct lws_protocol_vhost_options _lws_vhost_opt
ClientContextMap _client_ctx
int recv_client(Client, void *, size_t)
int send_availsurf_body(Client)
struct lws_context_creation_info _lws_info
std::unordered_map< Client, ClientContext > ClientContextMap
int add_poll_fd(struct lws_pollargs *)
static int lws_callback(struct lws *, enum lws_callback_reasons, void *, void *, size_t)
int del_poll_fd(struct lws_pollargs *)
static gboolean glib_idle_callback(void *)
bool read_blocks_event_loop()
int mod_poll_fd(struct lws_pollargs *)
Glib::IOCondition events_to_ioc(int)
int ioc_to_events(Glib::IOCondition)
struct lws_http_mount _lws_mnt_root
void update_all_clients(const NodeState &, bool)
struct lws_context * _lws_context
void request_write(Client)
void update_client(Client, const NodeState &, bool)
std::unordered_map< lws_sockfd_type, LwsPollFdGlibSource > LwsPollFdGlibSourceMap
Glib::RefPtr< Glib::IOChannel > _channel
WebsocketsServer(ArdourSurface::ArdourWebsockets &)
virtual ~WebsocketsServer()
struct lws_http_mount _lws_mnt_user
struct lws_protocols _lws_proto[2]
Glib::RefPtr< Glib::IOChannel > g_channel
Glib::RefPtr< Glib::IOSource > wg_iosrc
struct lws_pollfd lws_pfd
Glib::RefPtr< Glib::IOSource > rg_iosrc