Skip to content

Releases: supahero1/shnet

v1.3.4

18 Sep 09:09
Compare
Choose a tag to compare
  • Fixed Makefile's COVERAGE flag,
  • Added data_storage_size(),
  • Overhauled the async module. Now there's just one async_loop_shutdown() function instead of async_loop_push_xxx() and async_loop_commit(). Additionally, atomic variables and operations are no longer used in the module,
  • Updated the docs and test suites to reflect the above changes.

v1.3.3

04 Sep 17:03
Compare
Choose a tag to compare
  • Add PRESERVE_TESTS flag for future development,
  • Improved INSTALL,
  • Improved CLI. It will no longer display percentages, since, apparently, erasing even one line in the terminal is a big deal and cannot be done easily, so the idea was dropped completely,
  • Improved Makefile:
    • in. files will no longer keep triggering a rebuild (modification of sed_in),
    • Files are now output in the DIR_OUT directory while preserving their original directory tree relative to the DIR_IN directory (preventing name clashing),
    • No longer needed to provide BUILD_SRC (optional) and BUILD_OUT (deleted due to above).

v1.3.2

25 Aug 18:53
Compare
Choose a tag to compare
  • Added limited CLI,
  • Fixed the threads test (rare race condition),
  • Added more code coverage for the tcp module,
  • Exposed the tcp_send_buffered() socket function in the tcp module (for testing purposes only),
  • Other minor improvements to the tcp module,
  • Fixed Makefile (again).

v1.3.1

21 Jun 17:56
Compare
Choose a tag to compare
  • Header guards are now meaningful, in the format of _shnet_PATH_TO_THE_FILE_AND_FILE_NAME_h_,
  • Clarified C++ support in README.md,
  • Made time_thread() a global declaration like async_thread(),
  • Fixed compilation error where sed_in and unsed_in weren't given a proper EXECUTABLE flag,
  • Other small changes.

v1.3

23 May 08:11
Compare
Choose a tag to compare

This release obsoletes all previous releases. It changes a lot of API and old behavior. It also changed the file system and building process of the library.

And it's not done yet. The next release, the TLS module will be brought back to life, along with a new CLI with tons of options.

All changes:

  • Whole new build system. Makefiles are now in every folder that building takes place and they only require a few lines of code to compile lots of files.
  • Whole new library structure in file system.
  • Relicensed to Apache License 2.0 (previously MIT).
  • New extended tests. The library has over 95% code coverage now.
  • A lot of bug fixes.
  • Redundant or not working code was removed.
  • Rewrote documentation. Also, now every module has a note saying what other modules it depends on.
  • Both error and test modules are now full (not header only anymore).
  • Now compatible with C++ when compiling with GCC. However, you MUST NOT modify any atomic variables in the underlying code's structures. Only modify what the documentation says you can.
  • Removed event loop's ability to simulate events (redundant).
  • Added shnet_malloc(), shnet_calloc(), and shnet_realloc().
  • Changed the order of arguments in TCP server's on_event.
  • Closing a TCP server now will always succeed.
  • TCP servers will now never lose any events (don't know if they ever could, but now they certainly won't).
  • Changed names of a lot of time functions to be shorter.
  • Changed the way how TCP deals with multithreading. Now it properly uses full mutex locks instead of mere atomic operations. Moreover, the locks don't really add much new contention.
  • Added special cases to *_resize() functions for size 0 and structure.size. In the first case, the functions will no longer throw an error, but will instead free the structure. In the second case, they will go the fast path and not do anything.
  • data_storage_drain() no longer returns a value denoting if the storage is free or not. Use data_storage_is_empty() instead.
  • Fortified some sem_wait()'s. Now they won't break everything if an interrupt arrives at the thread blocked at the function.
  • Every file now has a newline at the end of them.
  • All documentation (besides code within it), license, README, Makefiles and INSTALL now have line width limit set to 80.

And probably more changes on top of the above, but forgot to mention them.

v1.2.1

25 Mar 11:56
Compare
Choose a tag to compare
  • Fixed and improved Makefile
  • Lots of documentation changes
  • error_counter() now takes in a second argument to denote how many times in a row it has been called
  • Other small improvements throughout the library

v1.2

12 Feb 18:13
Compare
Choose a tag to compare
  • LOTS of tests added
  • Most modules were fundamentally rewritten, see docs/c to learn more about their current state. Too long to list all of the changes here
  • Extensive documentation added, covering every module in detail (docs/)
  • Added C++ support (Clang only)
  • Changed the directory structure of the library to allow for better layout of files

pre4-v1.2

07 Jan 00:06
Compare
Choose a tag to compare
pre4-v1.2 Pre-release
Pre-release

ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!

See pre-v1.2 release for details.

Existing modules should be pretty stable and MAY be used for production, although the docs for the tcp module aren't full yet.

List of changes:

  • Fixed a bug causing time_manager's thread to basically eat up the CPU (mismatch in clock types).

pre3-v1.2

06 Jan 15:25
Compare
Choose a tag to compare
pre3-v1.2 Pre-release
Pre-release

ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!

See pre-v1.2 release for details.

Existing modules should be pretty stable and MAY be used for production, although the docs for the tcp module aren't full yet.

List of changes:

  • Added docs for the net module, partially for the tcp module as well.
  • net_address_to_string() now can't fail.
  • Epoll thread functions now don't have asynchronous cancellability, since that's dangerous. Instead, they have a plenty of cancellation points scattered around them.
  • Removed net_epoll_shutdown() and net_epoll_shutdown_async() as they were misleading compared to their equivalents in the threads module. Edited the tcp module to include this change.

pre2-v1.2

05 Jan 22:03
Compare
Choose a tag to compare
pre2-v1.2 Pre-release
Pre-release

ALL PREVIOUS RELEASES ARE NOW OBSOLETE AND CONSIDERED UNSTABLE AND UNUSABLE FOR PRODUCTION!

See pre-v1.2 release for details.

Existing modules should be pretty stable and MAY be used for production, although there are no docs for the net and tcp modules yet.

Read README for some of the changes or new functions that are briefly mentioned here.

List of changes:

  • Remove useless dependencies used by old modules from MAKEFILE.
  • Reworked the README to include better documentation and examples as well as better overall organisation. It no longer mentions old modules.
  • Added new tests, improved coverage of existing ones, improved quality of code of tests.

debug:

  • Create debug_free() to be able to really see no memory leaks on Valgrind tests.

heap:

  • Added heap_pop_() to quickly remove the root without returning it to the application.
  • CODE BREAKER: Tweaked heap_peak() to start indexing from 0 instead of 1.
  • Added heap_peak_rel() as a function resolving to heap_peak(), but counting with 0, 1, 2, ... instead of 0, item_size, item_size * 2, ....
  • Added heap_abs_idx() to convert pointer to an item to its index in the heap to use in other functions.

[CODE BREAKER] refheap:

  • Rewrote it slightly to be much more similar to the heap module.
  • Fixed multiple inconsistencies:
    • refheap_resize() now is using multiples of refheap.item_size just like heaps,
    • Added refheap_pop_() to stay up-to-date with heaps,
    • Fixed multiple reference inconsistencies leading to various functions not being able to cooperate with each other in a viable way.
  • Fixed refheap_delete() - previously it could potentially break the whole heap structure if lucky enough.
  • Added refheap_inject() to be able to modify a reference of a node in the heap.
  • Added refheap_inject_rel(), which is the same as above, but is counting by 1 instead of by item_size.
  • Added refheap_min and refheap_max to reflect heap_min and heap_max respectively.

threads:

  • Added thread_cancellation_disable(), thread_cancellation_enable(), thread_cancellation_async(), and thread_cancellation_deferred(), to make it easier to modify the cancellability state and type of the current thread.
  • Remade the system of spawning new threads for struct threads. Now it will use less memory and should generally be safer.
  • Added asynchronous versions of thread_stop(), threads_remove(), and threads_shutdown().
  • NEW: Thread pool. Easily make threads execute various functions. Super fast and flexible. Perfectly compatible with struct thread and struct threads.

time:

  • Added a little bit of caching in the main time manager thread to avoid excess time-fetching calls.
  • Decreased the size of timer references by 8 bytes.
  • Added time_manager_lock() and time_manager_unlock() locking & unlocking functions along with raw variations of all timeout and interval functions. See README to learn more. Also see the threads module in the readme, thread pool section.
  • Added time_manager_resize_timeouts() and time_manager_resize_intervals() as well as the raw versions of these functions to not use refheap_resize() since it no longer would work the way it did.
  • time_manager_begin_modifying_xxx() was renamed to time_manager_open_xxx(). time_manager_end_modifying_xxx() was renamed to time_manager_close_xxx().
  • Fix time_manager_cancel_interval() crashing the program if the interval has already been cancelled before.

net:

  • Small changes caused by changes to the above modules.

tcp:

  • Minor improvements of the code.