Skip to content

Commit 347b3a3

Browse files
committed
modsocket: Add some comments on intended usage/API design of module.
1 parent 50b08c9 commit 347b3a3

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

unix/modsocket.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@
5050
#include "stream.h"
5151
#include "builtin.h"
5252

53+
/*
54+
The idea of this module is to implement reasonable minimum of
55+
socket-related functions to write typical clients and servers.
56+
The module named "microsocket" on purpose, to allow to make
57+
Python-level module more (or fully) compatible with CPython
58+
"socket", e.g.:
59+
---- socket.py ----
60+
from microsocket import *
61+
from socket_more_funcs import *
62+
from socket_more_funcs2 import *
63+
-------------------
64+
I.e. this module should stay lean, and more functions (if needed)
65+
should be add to seperate modules (C or Python level).
66+
*/
67+
5368
#define MICROPY_SOCKET_EXTRA (0)
5469

5570
typedef struct _mp_obj_socket_t {

0 commit comments

Comments
 (0)