The yasio-3.33.x is released!

Project Home page:

https://yasio.org/

Wht’s yasio?

  • A cross-platform non-blocking socket library focus on any client application network development.
  • Support OS: win,linux,android,ios,osx and etc.
  • Support game engines: cocos2d-x, unity3d, ue4 and etc.
  • Same API to manipulate transport with TCP, UDP, KCP.

yaiso-3.33.2 (2020.6.23)

  • Fix c-ares doesn’t get system dns for ios.
  • Add option YOPT_S_DNS_DIRTY for user to change system name servers after mobile network changed when c-ares enabled.
  • Refine write event register when system kernel write buffer is full.

yaiso-3.33.1 (2020.6.8)

  • Reduce the size of the Windows header files.
  • Improve yasio::inet::ip::endpoint code style.
  • Explicit socket_select_interrupter workaround code logic for borken firewalls on Windows.
  • Sets and pass user data of transport through event.
  • Fix KCP do_read may can’t dispatch upper data to user.
  • Fix behavior of yasio::wcsfmt.

yasio-3.33.0 (2020.5.26)

  • Refactor UDP like transport, UDP client don’t establish 4-tuple with peer, and provide YPOT_T_CONNECT and YPOT_T_DISCONNECT to change association.
  • Add io_service::write_to for unconnected/connected UDP transport.
  • Remove unused channel masks YCM_MCAST_CLIENT, YCM_MCAST_SERVER
  • Remove unused channel flag YCF_MCAST_LOOPBACK
  • Add new options YOPT_C_ENABLE_MCAST, YOPT_C_DISABLE_MCAST for multicast support
  • Change timer_cb_t prototype to []()->bool { }, return true for once, false for continue.
  • Add highp_timer::async_wait_once to wait timer timeout once.
  • Change YCM_XXX_[CLIENT/SERVER] to YCK_XXX_[CLIENT/SERVER].
  • Add yasio::xhighp_clock to retrive nanoseconds timestamp.
  • Fix xxsocket APIs connect_n, recv_n doesn’t handle signal EINTR.
  • Tidy obstream/ibstream API, by default write_v/read_v use 7bit encoded int for length field.
  • Rename io_service start_service/stop_service to start/stop.
  • Fix c-ares timeout behavior.
  • Improve c-ares cleanup behavior, now destruct io_service more stable with c-ares enabled.
  • Make cxx17::string_view support unordered set/map on compilers which only support c++11 standard.
  • Use shared_ptr + shared_mutex to ensure destruct io_service safe without side affect for concurrency of name resolving.
  • Fix dns cache timeout mechanism doesn’t work.
  • Simplify c-ares dns-server setup on android, when use yasio as static library, you need call yasio__jni_onload at JNI_OnLoad.
  • Fix yasio::_strfmt may crash on some incorrect use, now it’s more stable on all platforms.
  • Improve behavior when kernel send buffer is full, don’t sleep a fixed time, just drived by select.
  • Optimize udp transport close behavior, by default, udp transport will never close except user request, still can use io_service’s option YOPT_S_IGNORE_UDP_ERROR to change this behavior.
  • Change write completion handler prototype to: std::function<void(int ec, size_t bytes_transferred)>.
  • Implement literals for cxx17::string_view.
  • Fix ssl handshake failed with certificate verify failed when cacert file provided and flag SSL_VERIFY_PEER was set.
  • Fix doesn’t call io_service destructor when use lua binding library kaguya on compiler without c++14 support.
  • Add io_service::init_globals(const print_fn_t&) to support redirect initialization log to custom file(U3D/UE4 Console).
  • Improve compiler support, now support c++14, c++17, c++20.
  • Auto choose library sol2 for lua binding when cxx_std >= 14, older require cxx_std >= 17.
  • Recreate the socket_select_interrupter’s sockets on error.
  • Update kcp to v1.7, the kcp older version may cause SIGBUS on mobile ARM.
  • Simplify API, remove unnecessary API io_service::reopen, please use io_service::open instead.
  • Fix crash at yasio::inet::ip::endpoint::ip() when af=0.
  • Make io_service::write to a kcp return value same as other channel.
  • Fix kcp server doesn’t decode packet header.
  • Add xxsocket::disconnect to dissolve the 4-tuple association.
  • Rename option YOPT_I_SOCKOPT to YOPT_B_SOCKOPT.
  • Other code quality & stable improvements.
2 Likes

Hi there,

It is really interesting. Could we have an example project for cocos creator with UDP socket?

Hello, there is a example project with tcp,udp,kcp test: https://github.com/yasio/inettester
and the simuator with yasio can be download at: https://github.com/yasio/inettester/releases/download/v0.0.1/ccc2.3.4-simulator.7z

yaiso-3.33.4 released

  • Add log level support, use option YOPT_S_PRINT_FN2

yaiso-3.33.6 released

Changes since 3.33.4

  • Reduce kcp cpu usage
  • Add option YOPT_C_KCP_CONV for support set kcp conv id
  • Fix speedtest for kcp on single-core GPU system

yaiso-3.33.8 released

  • Auto call socket.shutdown at xxsocket::close to fix blocking on socket.recv when close socket at other thread for non-win32 platforms.

yasio-3.33.9 released

  • Fix win32 udp server implementation
  • Print remote point as peer for a new udp transport
  • Remove options YOPT_IGNORE_UDP_ERROR

yasio-3.34.0 released

  • Add 7bit Encoded Int64 support for obstream/ibstream
  • Rename obstream/ibstream 7bit Encoded Int APIs write_i/read_i to write_ix/read_ix
  • Rename obstream/ibstream Fixed Encoded Number APIs write_ix/read_ix to write/read

yasio-3.35.0 released

  • Provides normally byte order convert function templates host_to_network and network_to_host at namespace yasio::endian.
  • Reimplement obstream, ibstream as class templates basic_obstream, basic_ibstream with convert_traits support.
  • Using new yasio::endian::convert_traits<network_convert_tag> for obstream and ibstream with byte order convertion.
  • Using new yasio::endian::convert_traits<host_convert_tag> for fast_obstream and fast_ibstream without byte order convertion.
  • Add io_service::cleanup_globals
    It’s useful to clear custom print function object when you unload the module
    (usually .dll or .so) which contains the function object.
  • Fix socket reuse_address behavior since v3.33.7
  • Add YOPT_S_DEFER_EVENT_CB.
    a. User can do custom packet resolve at network thread, such as decompress and crc check.
    b. Return true, io_service will continue enque to event queue.
    c. Return false, io_service will drop the event.
    d. Callback prototype is: typedef std::function<bool(event_ptr& event)> defer_event_cb;

yasio-3.37.0

  1. Make timer object more safe, don’t hold reference of io_service.
  2. Embed default zh_CN docs markdown sources.
  3. Fix compile error when YASIO_VERBOSE_LOG enabled.
  4. Fix speedtest compile error when YASIO_HAVE_KCP enabled.
  5. Make host_to_network and network_to_host public at namespace yasio.
  6. Add yasio::set_thread_name to set caller thread name.
  7. Add obstream::clear for buffer reuse.
  8. Add ibstream::advance to move read position fastly.
  9. Enhance builtin decode_len function for transport stream unpack.
  10. Add github action freebsd.

yasio-3.36.0

  1. Add ssl backend mbedtls support.
  2. Add xxsocket::not_send_error for check whether socket status is good when send retval < 0.
  3. Add xxsocket::not_recv_error for check whether socket status is good when recv retval < 0.
  4. Delete xxsocket::alive.
  5. Delete all deprecated functions.
  6. Rename xxsocket::detach to xxsocket::release_handle.
  7. Rename xxsocket::pserv to xxsocket::pserve.

yasio-3.37.5 released

Make yasio::obstream more reusable
Fix multicast behavior incorrect
Fix ssl handle not destroy when connect timeout reached
Mbedtls 3.0.0 support

1 Like

yasio-3.37.6 released (release date: Nov 3,2021)

  1. Add option YOPT_S_DNS_LIST to set custom dns servers build with c-ares
  2. Add OpenSSL 3.0.0 support
  3. Add better API ip::endpoint::format_to to format socket address to string
  4. Add API ip::endpoint::scope_id to set or get ipv6 scope_id
  5. Improve ip::endpoint::as_xx for parsing scope_id from ipv6 string
  6. Add MinGW build support
  7. Fix compile issue when build inside unreal engine with module TraceAnalysis
  8. Fix timer not sort when same timer expire time changed, thanks to @koobin
  9. Fix the len of ip::endpoint not set when update endpoint ip with ip::endpoint::ip, will cause error 10014 on windows
  10. Make ibstream_view can construct with basic_obstream_view
  11. Improve xxsocket::disconnect platform compatible for udp, such as BSD-like system
  12. Imporve multicast support, and the test case works on windows,linux,macOS, thanks to @wzhengsen
  13. Add option YOPT_C_MCAST_IF to set multicast interface, on BSD-like system, it’s required for ipv6
  14. Improve io_service::stop flow, thanks to @koobin
1 Like

yasio-3.37.7 released (release date: Nov 8,2021)

  1. Fix connnect maybe always failed with error -26 when last domain name resolving failed
  2. Fix xxsocket::strerror incorrect for MinGW
  3. Add UWP ci
  4. Improve io_service::stop flow, thanks to @koobin
  5. Other code improvements

yasio-3.39.3

  1. Improve byte_buffer stl compatible
  2. Add option YOPT_C_UNPACK_NO_BSWAP
  3. Add urlEncode/urlDecode to extension yasio_http
  4. Improve extension yasio_http as unreal engine plugin
  5. Fix missing retrun statement in cxx17::string_view hasher template
  6. Change lua script io_event.packet(bool) to io_event:packet(bufferType)
    • yasio.BUFFER_DEFAULT: take packet as native yasio::ibstream
    • yasio.BUFFER_NO_BSWAP: take packet as natvie yasio::fast_ibstream without byte order convert
    • yasio.BUFFER_RAW: take packet as lua string
  7. CMake: Set default ssl backend to mbedtls

Maybe the title is a little bit outdated?

Better you have another title like: “yasio-releases”

Yes, and the correct project url is: GitHub - yasio/yasio: A multi-platform support c++11 library with focus on asio (asynchronous socket I/O) for any client applications.

yasio-3.39.6

  1. Reimplement reactor backends: select, poll
  2. Now the default reactor backend is poll
  3. Add compiler flag YASIO_DISABLE_POLL for switching to socket.select as same with previous releases
  4. Add signal_blocker when create service thread

yasio-3.39.5

  1. Fix no callback when resolve domain failed by getaddrinfo

yasio-3.39.4

  1. Fix process order
  2. Fix luabinding compile issue when shared packet enabled
  3. Improve CMake script, output libs to same directory

yasio-3.39.7

  1. Add forward event support fire packet event, new option: YOPT_S_FORWARD_EVENT, after enable forward event:

    • Use event->packet_view() receive packet event
    • No upack
    • No deferred event
    • No GC alloc
  2. Refactor ssl backends, add follow new option and channel kind

    • YOPT_S_SSL_CERT: to specific ssl server cert and private_key files
    • YCK_SSL_SERVER: open a channel as ssl server, notes: require specific valid cert and private_key file with option YOPT_S_SSL_CERT
    • Also fix crash on destructor of io_transport_ssl
  3. Improve option YOPT_S_SSL_CACERT, now support specific multi-certs with delimiter ,

  4. Improve c-ares integration

  5. Improve extesion yasio_http, move it’s dependent llhttp to thirdparty and managed by git submodule

  6. Remove signal_blocker when create service thread which will cause app random stuck on startup

  7. Fix c++20 compiler warnings

Notes:

A websocket implementation based on yasio is in progress at: WebSocket support based on yasio by halx99 · Pull Request #1001 · axmolengine/axmol · GitHub