summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-10 13:42:51 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-04-10 13:42:51 +0300
commitb69f798c92cfe9685382a8b5594dc62db77706a7 (patch)
treefc143680471e73728518bdea652fb88116664f6b
parent558fd5d228d3c610958c4aae41b1ede0b6487c35 (diff)
downloadmicropython-b69f798c92cfe9685382a8b5594dc62db77706a7.tar.gz
micropython-b69f798c92cfe9685382a8b5594dc62db77706a7.zip
extmod/modwebsocket.h: Split websocket-related defines for reuse.
-rw-r--r--extmod/modwebsocket.c6
-rw-r--r--extmod/modwebsocket.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c
index eb11d006d9..3175c61671 100644
--- a/extmod/modwebsocket.c
+++ b/extmod/modwebsocket.c
@@ -33,15 +33,11 @@
#include "py/obj.h"
#include "py/runtime.h"
#include "py/stream.h"
+#include "extmod/modwebsocket.h"
#if MICROPY_PY_WEBSOCKET
enum { FRAME_HEADER, FRAME_OPT, PAYLOAD };
-#define FRAME_OPCODE_MASK 0x0f
-enum {
- FRAME_CONT, FRAME_TXT, FRAME_BIN,
- FRAME_CLOSE = 0x8, FRAME_PING, FRAME_PONG
-};
enum { BLOCKING_WRITE = 0x80 };
diff --git a/extmod/modwebsocket.h b/extmod/modwebsocket.h
new file mode 100644
index 0000000000..7da147561c
--- /dev/null
+++ b/extmod/modwebsocket.h
@@ -0,0 +1,5 @@
+#define FRAME_OPCODE_MASK 0x0f
+enum {
+ FRAME_CONT, FRAME_TXT, FRAME_BIN,
+ FRAME_CLOSE = 0x8, FRAME_PING, FRAME_PONG
+};