summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-31 01:48:26 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-31 01:48:26 +0300
commit347b3a3d1f7c44442c77af20f27cf67412063fc3 (patch)
tree67f243974cb06754bed44710fd4b7bc630ad834b
parent50b08c920aa3f6a094fe099e9f86cec505885e2d (diff)
downloadmicropython-347b3a3d1f7c44442c77af20f27cf67412063fc3.tar.gz
micropython-347b3a3d1f7c44442c77af20f27cf67412063fc3.zip
modsocket: Add some comments on intended usage/API design of module.
-rw-r--r--unix/modsocket.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/unix/modsocket.c b/unix/modsocket.c
index 5a90474db9..d6f732377d 100644
--- a/unix/modsocket.c
+++ b/unix/modsocket.c
@@ -50,6 +50,21 @@
#include "stream.h"
#include "builtin.h"
+/*
+ The idea of this module is to implement reasonable minimum of
+ socket-related functions to write typical clients and servers.
+ The module named "microsocket" on purpose, to allow to make
+ Python-level module more (or fully) compatible with CPython
+ "socket", e.g.:
+ ---- socket.py ----
+ from microsocket import *
+ from socket_more_funcs import *
+ from socket_more_funcs2 import *
+ -------------------
+ I.e. this module should stay lean, and more functions (if needed)
+ should be add to seperate modules (C or Python level).
+ */
+
#define MICROPY_SOCKET_EXTRA (0)
typedef struct _mp_obj_socket_t {