aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mods/modusocket.c
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-11cc3200/modusocket: Fix connect() when in non-blocking or timeout mode.Damien George
Non-blocking connect on the CC3100 has non-POSIX behaviour and needs to be modified to match standard semantics.
2017-06-20cc3200: Initialise variable to zero to prevent compiler warnings.Damien George
2017-06-20cc3200: Make non-zero socket timeout work with connect/accept/send.Damien George
The CC3100 only allows to set a timeout for receiving data, not for accept, connect or send. But it can set non-blocking for all these operations and this patch uses that feature to implement socket timeout in terms of non- blocking behaviour combined with a loop.
2017-06-14cc3200/modusocket: Simplify socket.makefile() function.Damien George
Following how extmod/modlwip.c does it.
2017-03-31all: Use full path name when including mp-readline/timeutils/netutils.Damien George
This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
2017-03-29cc3200: Update for changes to mp_obj_str_get_data.Damien George
2017-02-22cc3200: Remove socket.timeout class, use OSError(ETIMEDOUT) instead.Damien George
socket.timeout is a subclass of OSError, and using the latter is more efficient than having a dedicated class. The argument of OSError is ETIMEDOUT so the error can be distinguished from other kinds of OSErrors. This follows how the esp8266 port does it.
2017-02-22cc3200/mods/modusocket: Init vars to 0 to silence compiler warnings.Damien George
Some compilers can't analyse the code to determine that these variables are always set before being used.
2017-02-22cc3200: Convert to using uPy internal errno numbers.Damien George
2017-02-22cc3200: Move wlan socket glue functions from modwlan to modusocket.Damien George
It saves about 400 bytes of code space because the functions can now be inlined.
2017-02-21cc3200: Use simplelink API instead of emulated BSD API.Damien George
Most of cc3200 uses explicit simplelink calls anyway, and this means there are no longer any clashes with macros from the C stdlib.
2017-01-29cc3200/modusocket: Remove deprecated socket.error.Paul Sokolovsky
socket.error is deprecated even in upstream: https://docs.python.org/3/library/socket.html#socket.error, and never was a part of MicroPython socket API.
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-11-14all: Remove readall() method, which is equivalent to read() w/o args.Paul Sokolovsky
Its addition was due to an early exploration on how to add CPython-like stream interface. It's clear that it's not needed and just takes up bytes in all ports.
2016-10-18cc3200: Use mp_raise_XXX helper functions to reduce code size.Damien George
Reduces code size by 632 bytes.
2016-09-22all: Remove 'name' member from mp_obj_module_t struct.Damien George
One can instead lookup __name__ in the modules dict to get the value.
2016-06-18all: Rename mp_obj_type_t::stream_p to protocol.Paul Sokolovsky
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
2016-02-21cc3200: Improve robustness of WLAN during sleep modes.danicampora
2016-01-11py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-10-22cc3200: Add created sockets to the registry.danicampora
2015-10-21docs: Add usocket and ussl modules' documentation.danicampora
2015-10-21cc3200: Make socket.listen([backlog]) compliant with Python 3.5.danicampora
2015-10-21cc3200: Clean-up socket constants.danicampora
2015-07-30cc3200: On ssl.read() or ssl.readall() ignore ssl layer closed error.Daniel Campora
2015-07-30cc3200: Add socket.makefile()Daniel Campora
2015-07-17cc3200: Add socket.sendall() (aliases to send()).Daniel Campora
Simplelink's socket send checks for the size of the packet and sends it in chunks if the size is too large.
2015-07-16cc3200: Make socket stream methods return POSIX error codes.Daniel Campora
2015-07-10cc3200: Refactor and clean-up socket closing code.Daniel Campora
2015-07-07cc3200: Translate simplelink's socket error numbers to POSIX values.Daniel Campora
2015-07-02cc3200: Fix socket recv and recvfrom return value type.Daniel Campora
2015-07-02cc3200: Add modussl, ssl sockets subclassed from normal sockets.Daniel Campora
Stream methods were added to normal sockets as in the unix port.
2015-07-02cc3200: Add socket.timeout and socket.error exceptions.Daniel Campora
2015-06-29cc3200: Correct socket settimeout time format.Daniel Campora
2015-05-24cc3200: Remove NIC abstraction layer.Daniel Campora
That layer is nice, but the CC3200 doesn't need it and getting rid of it saves ~200 bytes, which are more than welcome.
2015-05-24cc3200: Reset the servers and close user sockets on WLAN disconection.Daniel Campora
This is needed to avoid half-open connections.
2015-05-22cc3200: Finally unlock the full wake on WLAN feature set.Daniel Campora
2015-05-12py: Add mp_obj_get_int_truncated and use it where appropriate.Damien George
mp_obj_get_int_truncated will raise a TypeError if the argument is not an integral type. Use mp_obj_int_get_truncated only when you know the argument is a small or big int.
2015-05-04lib: Move some common mod_network_* functions to lib/netutils.Josef Gajdusek
2015-04-28cc3200: Select NIC when the socket is created.Daniel Campora
This makes sense since only WLAN is supported here.
2015-04-18cc3200: Clean up and reduce use/include of std.h.Damien George
2015-04-14cc3200: Add IPPROTO_SEC to be able to create secure sockets.Daniel Campora
2015-02-21cc3200: Add explicit py/ path-prefix for py includes.Damien George
This is how it should be, so one knows exactly where the includes are coming from.
2015-02-06cc3200: Add cc3200 port of MicroPython.danicampora
The port currently implements support for GPIO, RTC, ExtInt and the WiFi subsystem. A small file system is available in the serial flash. A bootloader which makes OTA updates possible, is also part of this initial implementation.