From fd373d0b0f580b56f3350e92207cfa499806ca4d Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Thu, 12 Apr 2012 11:30:40 +0200 Subject: Added a bit of debugging messages. Merged task_proto and observe_proto into one protocol in munia_proto. --- src/Makefile.am | 6 +- src/connectionhandler.cc | 7 ++ src/connectionhandler.h | 2 + src/messagehandler.cc | 10 ++- src/messagehandler.h | 3 +- src/munia_proto.cc | 188 +++++++++++++++++++++++++++++++++++++++++++++++ src/munia_proto.h | 44 +++++++++++ src/muniad.cc | 6 +- src/observe_proto.cc | 85 --------------------- src/observe_proto.h | 44 ----------- src/task_proto.cc | 172 ------------------------------------------- src/task_proto.h | 44 ----------- 12 files changed, 254 insertions(+), 357 deletions(-) create mode 100644 src/munia_proto.cc create mode 100644 src/munia_proto.h delete mode 100644 src/observe_proto.cc delete mode 100644 src/observe_proto.h delete mode 100644 src/task_proto.cc delete mode 100644 src/task_proto.h (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 4d087d8..9fccb45 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,12 +14,11 @@ muniad_SOURCES = \ http.cc \ messagehandler.cc \ messageparser.cc \ + munia_proto.cc \ saxparser.cc \ task.cc \ - task_proto.cc \ taskmanager.cc \ tasktree.cc \ - observe_proto.cc \ xml_encode_decode.cc \ xmlparser.cc @@ -31,12 +30,11 @@ EXTRA_DIST = \ message.h \ messageparser.h \ messagehandler.h \ + munia_proto.h \ saxparser.h \ task.h \ - task_proto.h \ taskmanager.h \ tasktree.h \ - observe_proto.h \ xml_encode_decode.h \ xmlparser.h diff --git a/src/connectionhandler.cc b/src/connectionhandler.cc index 9362965..85ae4a7 100644 --- a/src/connectionhandler.cc +++ b/src/connectionhandler.cc @@ -38,7 +38,14 @@ ConnectionHandler::ConnectionHandler() void ConnectionHandler::init(clientid_t clientid) { + printf("Adding client %p to connection list\n", clientid); connlist[clientid] = std::set(); + + printf("Connections (%d):\n", connlist.size()); + ConnectionList::iterator it; + for(it = connlist.begin(); it != connlist.end(); it++) { + printf("\t%p\n", it->first); + } } void ConnectionHandler::close(clientid_t clientid) diff --git a/src/connectionhandler.h b/src/connectionhandler.h index f5e63d7..464128b 100644 --- a/src/connectionhandler.h +++ b/src/connectionhandler.h @@ -32,6 +32,8 @@ #include #include +#include + #include "task.h" typedef struct libwebsocket* clientid_t; diff --git a/src/messagehandler.cc b/src/messagehandler.cc index 5f3cafb..89b476a 100644 --- a/src/messagehandler.cc +++ b/src/messagehandler.cc @@ -32,7 +32,7 @@ TaskManager taskman; -MessageList handle_msg(MessageList msgList) { +MessageList handle_msg(MessageList msgList, clientid_t wsi) { MessageList::iterator it; for(it = msgList.begin(); @@ -48,7 +48,7 @@ MessageList handle_msg(MessageList msgList) { t.title = m.add.title; t.desc = m.add.desc; try { - it->nodes = taskman.addTask(t, m.add.parentid); + it->nodes = taskman.addTask(t, m.add.parentid); } catch (std::exception& e) { DEBUG(messagehandler, "Error adding task\n"); @@ -77,6 +77,12 @@ MessageList handle_msg(MessageList msgList) { } } break; + case cmd::observe: + connection_handler.observe(wsi, m.observe.id); + break; + case cmd::unobserve: + connection_handler.unobserve(wsi, m.observe.id); + break; case cmd::update: { INFO(messagehandler, "Handling update command\n"); diff --git a/src/messagehandler.h b/src/messagehandler.h index 2651255..cc2c8a0 100644 --- a/src/messagehandler.h +++ b/src/messagehandler.h @@ -30,8 +30,9 @@ #include "messageparser.h" +#include "connectionhandler.h" -MessageList handle_msg(MessageList inMsgList); +MessageList handle_msg(MessageList inMsgList, clientid_t wsi); #endif/*__MUNIA_MSGHANDLER_H__*/ diff --git a/src/munia_proto.cc b/src/munia_proto.cc new file mode 100644 index 0000000..3679a81 --- /dev/null +++ b/src/munia_proto.cc @@ -0,0 +1,188 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set et sw=2 ts=2: */ +/*************************************************************************** + * munia_proto.cc + * + * Fri Feb 24 08:23:16 CET 2012 + * Copyright 2012 Bent Bisballe Nyeng + * deva@aasimon.org + ****************************************************************************/ + +/* + * This file is part of Munia. + * + * Munia is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Munia is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Munia; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +#include "munia_proto.h" + +#include +#include + +#include +#include + +#include "task.h" +#include "messageparser.h" +#include "messagehandler.h" +#include "connectionhandler.h" + +#include "taskmanager.h" + +extern TaskManager taskman; + +#if 0 +static void dump_handshake_info(struct lws_tokens *lwst) +{ + int n; + static const char *token_names[WSI_TOKEN_COUNT] = { + /*[WSI_TOKEN_GET_URI] =*/ "GET URI", + /*[WSI_TOKEN_HOST] =*/ "Host", + /*[WSI_TOKEN_CONNECTION] =*/ "Connection", + /*[WSI_TOKEN_KEY1] =*/ "key 1", + /*[WSI_TOKEN_KEY2] =*/ "key 2", + /*[WSI_TOKEN_PROTOCOL] =*/ "Protocol", + /*[WSI_TOKEN_UPGRADE] =*/ "Upgrade", + /*[WSI_TOKEN_ORIGIN] =*/ "Origin", + /*[WSI_TOKEN_DRAFT] =*/ "Draft", + /*[WSI_TOKEN_CHALLENGE] =*/ "Challenge", + + /* new for 04 */ + /*[WSI_TOKEN_KEY] =*/ "Key", + /*[WSI_TOKEN_VERSION] =*/ "Version", + /*[WSI_TOKEN_SWORIGIN] =*/ "Sworigin", + + /* new for 05 */ + /*[WSI_TOKEN_EXTENSIONS] =*/ "Extensions", + + /* client receives these */ + /*[WSI_TOKEN_ACCEPT] =*/ "Accept", + /*[WSI_TOKEN_NONCE] =*/ "Nonce", + /*[WSI_TOKEN_HTTP] =*/ "Http", + /*[WSI_TOKEN_MUXURL] =*/ "MuxURL", + }; + + for (n = 0; n < WSI_TOKEN_COUNT; n++) { + if (lwst[n].token == NULL || lwst[n].token_len == 0) continue; + fprintf(stderr, " %s = ", token_names[n]); + if(fwrite(lwst[n].token, 1, lwst[n].token_len, stderr)) {} + fprintf(stderr, "\n"); + } +} +#endif + +static std::map > msgqueue; + +int callback_lws_task(struct libwebsocket_context * context, + struct libwebsocket *wsi, + enum libwebsocket_callback_reasons reason, + void *user, void *in, size_t len) +{ + taskman.tree.toStdOut(); + + printf("Callback on %p\n", wsi); + + switch (reason) { + case LWS_CALLBACK_ESTABLISHED: + connection_handler.init(wsi); + break; + + case LWS_CALLBACK_CLOSED: + connection_handler.close(wsi); + break; + + case LWS_CALLBACK_SERVER_WRITEABLE: + { + printf("Socket for client %p writable\n", wsi); + if(msgqueue[wsi].size() > 0) { + std::string msg = msgqueue[wsi].front(); + msgqueue[wsi].pop(); + int n = libwebsocket_write(wsi, (unsigned char *) + msg.c_str() + + LWS_SEND_BUFFER_PRE_PADDING, + msg.length() - LWS_SEND_BUFFER_POST_PADDING - + LWS_SEND_BUFFER_PRE_PADDING, + LWS_WRITE_TEXT); + if(n < 0) { + fprintf(stderr, "ERROR writing to socket"); + exit(1); + } + } + else { + printf("\tNo queued data awaiting transmission\n"); + } + + if(msgqueue[wsi].size()) { + libwebsocket_rx_flow_control(wsi, 1); + libwebsocket_callback_on_writable(context, wsi); + } + } + break; + + /* + case LWS_CALLBACK_BROADCAST: + printf("LWS_CALLBACK_BROADCAST\n"); + n = libwebsocket_write(wsi, (unsigned char*)in, len, LWS_WRITE_TEXT); + if (n < 0) fprintf(stderr, "task write failed\n"); + break; + */ + + case LWS_CALLBACK_RECEIVE: + { + printf("LWS_CALLBACK_RECEIVE\n"); + + printf("%s\n", (char*)in); + std::string data; + data.append((char*)in, len); + + MessageList mlst = parse_msg(data); + printf("Handling %d incoming message\n", mlst.size()); + MessageList omsgs = handle_msg(mlst, wsi); + printf("Handling %d outgoing messages\n", omsgs.size()); + + MessageList::iterator omi = omsgs.begin(); + while(omi != omsgs.end()) { + std::string msg; + msg.append((size_t)LWS_SEND_BUFFER_PRE_PADDING, ' '); + msg.append(msg_tostring(*omi)); + msg.append((size_t)LWS_SEND_BUFFER_POST_PADDING, ' '); + + printf("%d nodes affected by command\n", omi->nodes.size()); + + std::set clients = + connection_handler.observerlist(omi->nodes); + printf("Writing message to %d clients\n", clients.size()); + + std::set::iterator ci = clients.begin(); + while(ci != clients.end()) { + clientid_t clientid = *ci; + printf("\tAdding data to %p's queue\n", clientid); + msgqueue[*ci].push(msg); + ci++; + } + + omi++; + } + + libwebsocket_callback_on_writable_all_protocol( + libwebsockets_get_protocol(wsi)); + } + break; + + default: + break; + } + + return 0; +} diff --git a/src/munia_proto.h b/src/munia_proto.h new file mode 100644 index 0000000..db10c16 --- /dev/null +++ b/src/munia_proto.h @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set et sw=2 ts=2: */ +/*************************************************************************** + * munia_proto.h + * + * Fri Feb 24 08:23:15 CET 2012 + * Copyright 2012 Bent Bisballe Nyeng + * deva@aasimon.org + ****************************************************************************/ + +/* + * This file is part of Munia. + * + * Munia is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Munia is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Munia; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ +#ifndef __MUNIA_MUNIA_PROTO_H__ +#define __MUNIA_MUNIA_PROTO_H__ + +#include + +#include + +int callback_lws_task(struct libwebsocket_context *context, + struct libwebsocket *wsi, + enum libwebsocket_callback_reasons reason, + void *user, void *in, size_t len); + +struct per_session_data__lws_task { + struct libwebsocket *wsi; +}; + +#endif/*__MUNIA_MUNIA_PROTO_H__*/ diff --git a/src/muniad.cc b/src/muniad.cc index 2307160..34f5c6a 100644 --- a/src/muniad.cc +++ b/src/muniad.cc @@ -36,8 +36,7 @@ #include #include "http.h" -#include "task_proto.h" -#include "observe_proto.h" +#include "munia_proto.h" #include "debug.h" static struct libwebsocket_protocols protocols[] = { @@ -45,9 +44,6 @@ static struct libwebsocket_protocols protocols[] = { { "http-only", callback_http, 0 }, { "lws-task-protocol", callback_lws_task, sizeof(struct per_session_data__lws_task) - }, - { "lws-observe-protocol", callback_lws_observe, - sizeof(struct per_session_data__lws_observe) }, { NULL, NULL, 0 } // End of list }; diff --git a/src/observe_proto.cc b/src/observe_proto.cc deleted file mode 100644 index e8f78de..0000000 --- a/src/observe_proto.cc +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set et sw=2 ts=2: */ -/*************************************************************************** - * observe_proto.cc - * - * Fri Mar 23 15:29:13 CET 2012 - * Copyright 2012 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of Munia. - * - * Munia is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Munia is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Munia; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#include "observe_proto.h" - -#include -#include - -#include -#include - -#include "task.h" -#include "messageparser.h" - -#include "connectionhandler.h" - -int callback_lws_observe(struct libwebsocket_context *context, - struct libwebsocket *wsi, - enum libwebsocket_callback_reasons reason, - void *user, void *in, size_t len) -{ - switch (reason) { - case LWS_CALLBACK_ESTABLISHED: - connection_handler.init(wsi); - break; - - case LWS_CALLBACK_CLOSED: - connection_handler.close(wsi); - break; - - case LWS_CALLBACK_RECEIVE: - { - std::string data; - data.append((char*)in, len); - - MessageList mlst = parse_msg(data); - for(MessageList::iterator i = mlst.begin(); i != mlst.end(); i++) { - message_t m = *i; - switch(m.cmd) { - case cmd::observe: { - connection_handler.observe(wsi, m.observe.id); - break; - } - case cmd::unobserve: { - connection_handler.unobserve(wsi, m.observe.id); - break; - } - default: - printf("Wrong command :(\n"); - break; - } - } - } - break; - - default: - break; - } - - return 0; -} diff --git a/src/observe_proto.h b/src/observe_proto.h deleted file mode 100644 index 6ef1e66..0000000 --- a/src/observe_proto.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set et sw=2 ts=2: */ -/*************************************************************************** - * observe_proto.h - * - * Fri Mar 23 15:29:13 CET 2012 - * Copyright 2012 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of Munia. - * - * Munia is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Munia is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Munia; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef __MUNIA_OBSERVE_PROTO_H__ -#define __MUNIA_OBSERVE_PROTO_H__ - -#include - -#include - -int callback_lws_observe(struct libwebsocket_context *context, - struct libwebsocket *wsi, - enum libwebsocket_callback_reasons reason, - void *user, void *in, size_t len); - -struct per_session_data__lws_observe { - struct libwebsocket *wsi; -}; - -#endif/*__MUNIA_OBSERVE_PROTO_H__*/ diff --git a/src/task_proto.cc b/src/task_proto.cc deleted file mode 100644 index 24be3b0..0000000 --- a/src/task_proto.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set et sw=2 ts=2: */ -/*************************************************************************** - * task_proto.cc - * - * Fri Feb 24 08:23:16 CET 2012 - * Copyright 2012 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of Munia. - * - * Munia is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Munia is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Munia; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#include "task_proto.h" - -#include -#include - -#include -#include - -#include "task.h" -#include "messageparser.h" -#include "messagehandler.h" -#include "connectionhandler.h" - -#include "taskmanager.h" - -extern TaskManager taskman; - -#if 0 -static void dump_handshake_info(struct lws_tokens *lwst) -{ - int n; - static const char *token_names[WSI_TOKEN_COUNT] = { - /*[WSI_TOKEN_GET_URI] =*/ "GET URI", - /*[WSI_TOKEN_HOST] =*/ "Host", - /*[WSI_TOKEN_CONNECTION] =*/ "Connection", - /*[WSI_TOKEN_KEY1] =*/ "key 1", - /*[WSI_TOKEN_KEY2] =*/ "key 2", - /*[WSI_TOKEN_PROTOCOL] =*/ "Protocol", - /*[WSI_TOKEN_UPGRADE] =*/ "Upgrade", - /*[WSI_TOKEN_ORIGIN] =*/ "Origin", - /*[WSI_TOKEN_DRAFT] =*/ "Draft", - /*[WSI_TOKEN_CHALLENGE] =*/ "Challenge", - - /* new for 04 */ - /*[WSI_TOKEN_KEY] =*/ "Key", - /*[WSI_TOKEN_VERSION] =*/ "Version", - /*[WSI_TOKEN_SWORIGIN] =*/ "Sworigin", - - /* new for 05 */ - /*[WSI_TOKEN_EXTENSIONS] =*/ "Extensions", - - /* client receives these */ - /*[WSI_TOKEN_ACCEPT] =*/ "Accept", - /*[WSI_TOKEN_NONCE] =*/ "Nonce", - /*[WSI_TOKEN_HTTP] =*/ "Http", - /*[WSI_TOKEN_MUXURL] =*/ "MuxURL", - }; - - for (n = 0; n < WSI_TOKEN_COUNT; n++) { - if (lwst[n].token == NULL || lwst[n].token_len == 0) continue; - fprintf(stderr, " %s = ", token_names[n]); - if(fwrite(lwst[n].token, 1, lwst[n].token_len, stderr)) {} - fprintf(stderr, "\n"); - } -} -#endif - -static std::map > msgqueue; - -int callback_lws_task(struct libwebsocket_context * context, - struct libwebsocket *wsi, - enum libwebsocket_callback_reasons reason, - void *user, void *in, size_t len) -{ - taskman.tree.toStdOut(); - - switch (reason) { - case LWS_CALLBACK_SERVER_WRITEABLE: - { - if(msgqueue[wsi].size() > 0) { - std::string msg = msgqueue[wsi].front(); - msgqueue[wsi].pop(); - int n = libwebsocket_write(wsi, (unsigned char *) - msg.c_str() + - LWS_SEND_BUFFER_PRE_PADDING, - msg.length() - LWS_SEND_BUFFER_POST_PADDING - - LWS_SEND_BUFFER_PRE_PADDING, - LWS_WRITE_TEXT); - if(n < 0) { - fprintf(stderr, "ERROR writing to socket"); - exit(1); - } - } - - if(msgqueue[wsi].size()) { - libwebsocket_rx_flow_control(wsi, 1); - libwebsocket_callback_on_writable(context, wsi); - } - } - break; - - /* - case LWS_CALLBACK_BROADCAST: - printf("LWS_CALLBACK_BROADCAST\n"); - n = libwebsocket_write(wsi, (unsigned char*)in, len, LWS_WRITE_TEXT); - if (n < 0) fprintf(stderr, "task write failed\n"); - break; - */ - - case LWS_CALLBACK_RECEIVE: - { - printf("LWS_CALLBACK_RECEIVE\n"); - - printf("%s\n", (char*)in); - std::string data; - data.append((char*)in, len); - - MessageList mlst = parse_msg(data); - printf("Handling %d incoming message\n", mlst.size()); - MessageList omsgs = handle_msg(mlst); - printf("Handling %d outgoing messages\n", omsgs.size()); - - MessageList::iterator omi = omsgs.begin(); - while(omi != omsgs.end()) { - std::string msg; - msg.append((size_t)LWS_SEND_BUFFER_PRE_PADDING, ' '); - msg.append(msg_tostring(*omi)); - msg.append((size_t)LWS_SEND_BUFFER_POST_PADDING, ' '); - - printf("%d nodes affected by command\n", omi->nodes.size()); - - std::set clients = - connection_handler.observerlist(omi->nodes); - printf("Writing message to %d clients\n", clients.size()); - - std::set::iterator ci = clients.begin(); - while(ci != clients.end()) { - msgqueue[*ci].push(msg); - ci++; - } - - omi++; - } - - libwebsocket_callback_on_writable_all_protocol( - libwebsockets_get_protocol(wsi)); - } - break; - - default: - break; - } - - return 0; -} diff --git a/src/task_proto.h b/src/task_proto.h deleted file mode 100644 index 160dee9..0000000 --- a/src/task_proto.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set et sw=2 ts=2: */ -/*************************************************************************** - * task_proto.h - * - * Fri Feb 24 08:23:15 CET 2012 - * Copyright 2012 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of Munia. - * - * Munia is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Munia is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Munia; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#ifndef __MUNIA_TASK_PROTO_H__ -#define __MUNIA_TASK_PROTO_H__ - -#include - -#include - -int callback_lws_task(struct libwebsocket_context *context, - struct libwebsocket *wsi, - enum libwebsocket_callback_reasons reason, - void *user, void *in, size_t len); - -struct per_session_data__lws_task { - struct libwebsocket *wsi; -}; - -#endif/*__MUNIA_TASK_PROTO_H__*/ -- cgit v1.2.3