The yasio-3.22.0 is released!

This is a lightweight & stable cross-platform support library with a focus on asynchronous socket I/O, support win32 & linux & apple & android & wp8 & wp8.1-universal & win10-universal
The core design is reference from https://github.com/chriskohlhoff/asio but very small.
This lib has been used by project http://hongjing.qq.com/ and run at millions of devices.

Features:

  • support IPv6-only network.
  • support multi-connections at one thread.
  • support deadline timer.
  • processing tcp sticky internal, user do not need to care it.
  • support lua bindings
  • support cocos2d-x jsb
  • support CocosCreator jsb2.0
  • support Unity3D
  • per io_service, per thread to process socket read,write,connect operations.

There is a simple http client GET implementation with yasio: http-client

For more detail and usage, see the repo

Latest stable release: https://github.com/halx99/yasio/releases

4 Likes

yasio-3.21.0

  1. Fix start_service/stop_service can’t work properly at twice.
  2. Add native interface for interop with other languages, such as C#
  3. Fix lua5.2 or lua5.3 for c++11 compile error.
  4. Make transport pointer more safe for Native Interface.
  5. Change script API: ibstream.read_v, obstream.write_v default behavior to use 7bit encoded int as length field.
  6. Remove script API: ibstream.read_string, obstream.write_string
  7. Add YASIO_NI API: yasio_set_resolv_fn to set custom dns resolver, such as httpdns

yasio-3.21.1

  1. Fix connection handle_close detect problem.
  2. Add YASIO_NI API: yasio_set_console_print_fn.

yasio-3.21.2

  1. Fix tcp keepalive option behavior is incorrect.

yasio-3.21.3

  1. Add yasio_memcpy for YASIO_NI, because C# no such function yet.

yasio-3.21.3f1

  1. Optimize script binding timer implementation, add API: stimer.killAll.

yasio-3.22.0

  1. Add kcp support.
  2. Change obstream.pop behavoir, see: https://github.com/halx99/yasio/wiki/obstream#Encapsulate-Packet
  3. Remove unused send timeout.
  4. Remove duplicated macro YOPT_CONNECT_TIMEOUT for script bindings.

yasio-3.22.1

  1. Add HEADER ONLY support.

yasio-3.23.0 is released!

  1. Make length field based frame decode associate with channel.
  2. Make decode length function associate with channel.
  3. Make transport send,flush as private for internal use.
  4. Change channel default length decode behavior to directly .
  5. Rename YOPT_RESOLV_FUNCTION to YOPT_RESOLV_FN .
  6. Rename YOPT_CONSOLE_PRINT_FUNCTION to YOPT_CONSOLE_PRINT_FN .
  7. Rename YOPT_DECODE_FRAME_LENGTH_FUNCTION to YOPT_CHANNEL_LFBFD_FN .
  8. Rename YOPT_LFBFD_PARAMS to YOPT_CHANNEL_LFBFD_PARAMS .
  9. Rename YOPT_IO_EVENT_CALLBACK to YOPT_IO_EVENT_CB .

yasio-3.23.1

  1. Fix UDP EPERM issue.
  2. Add option: YOPT_PRINT_FN.
  3. Remove option: YOPT_LOG_FILE and YOPT_CONSOLE_PRINT_FN.

yasio updates since v3.23.1 to v3.23.6:

  1. Fix jsb & jsb20 compile issue.
  2. Rename native interface yasio_close2 to yasio_close_handle
  3. Support detect whether ipv6 supported at android platform.
  4. Use dual event queue to avoid block recv operation when consumer thread do Long-Running Operations at event callback.
  5. Remove specific vs project files, use cmake instead.
  6. Use std::make_shared instead directly new.
  7. Unify optional macro YASIO_VERBOS_LOG.
  8. Rename stimer::killAll to stimer::clear.

yasio-3.26.0-dev1

  1. Use lock-free & wait-free SPSC queue for event & send queue.

yasio-3.26.0

  1. Rename macro YASIO_HAVE_KCP to YASIO_ENABLE_KCP and move to config.hpp.
  2. Rename macro _USING_OBJECT_POOL to YASIO_DISABLE_OBJECT_POOL and move to config.hpp.
  3. Add macro YASIO_DISABLE_SPSC_QUEUE to control whether disable single-producer, single-consumer lock-free queue.
  4. Change io_event_cb_t parameter to rval reference.

yasio-3.30.0 is released

Tidy option macros.
Add YCF_ enums to control channel to support more features.
Add multicast support.
Add a workaround implementation to support win32 udp-server.
Add io_service::cindex_to_handle.
Add ftp sever example.
Remove loop behavior of deadline_timer, user can schedule again when it’s expired.
Add obstream::write_byte.
Add to_strf_v4 for ip::endpoint.
Optimizing for file transfer, avoid high cpu occupation when system kernel send buffer is full.
More safe to check object valid which allocated from pool.
Add send complete callback.
Mark io_service::dispatch_events deprecated, use dispatch to instead.
Add YCF_REUSEPORT to control whether to enable socket can bind same port, default and previous vesion is enabled.
Implement case insensitive starts_with, ends_with at string_view.hpp.
Ignore SIGPIPE for tcp at non-win32 system.
Remove reconnect timeout.

yasio-3.31.0 is released

  1. Add Initial Bytes To Strip support for length field based frame decode, use YOPT_C_LFBFD_IBTS.
  2. Add SSL client support, use YASIO_HAVE_SSL to enable, YCM_SSL_CLIENT to open a channel with ssl client support, require openssl, so make sure your build system already have openssl.
  3. Integrate c-ares support, use YASIO_HAVE_CARES to enable, make sure your build system already have c-ares.
  4. Refactor timeout options, use YOPT_S_CONNECT_TIMEOUT, YOPT_S_DNS_CACHE_TIMEOUT, YOPT_S_DNS_QUERIES_TIMEOUT to instead YOPT_S_TIMEOUTS.
  5. Optimize schedule_timer behavior, always replace timer_cb when timer exist.
  6. Remove deprecated functions.
  7. Remove tolua support.
1 Like

yasio-3.31.1 is released

  1. Make c-ares works well on android 8 or later.

yasio-3.31.2 is released

  1. Optimize singleton implementation, see: https://github.com/simdsoft/yasio/issues/200
  2. Fix typo, YASIO_VERBOS_LOG to YASIO_VERBOSE_LOG.
  3. Explicit set socktype for getaddrinfo, see: https://github.com/simdsoft/yasio/issues/201
  4. Improve xxsocket send_n/recv_n implementation and behavior, see: https://github.com/simdsoft/yasio/issues/202

yasio-3.31.3 is released

  1. Optimize API io_service::write, add write raw buf support.
  2. Fix issue: https://github.com/simdsoft/yasio/issues/208
  3. Fix issue: https://github.com/simdsoft/yasio/issues/209

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.