Releases: Antruly/VLibuv
v1.4.0
VLibuv 1.4.0 Release Notes
We are thrilled to announce the release of VLibuv 1.4.0! This version introduces a host of enhancements and bug fixes that improve performance and compatibility across various platforms.
Major Enhancements
-
Linux Platform Updates:
- Enhanced support for newer kernel versions with updated system call adaptations. This improvement boosts performance and compatibility across different Linux distributions.
-
Windows Improvements:
- Introduced several fixes to handle Windows-specific network and file system operations more efficiently, reducing overhead and increasing reliability.
-
Cross-platform Compatibility:
- Strengthened cross-platform capabilities to ensure more consistent behavior and performance across all supported platforms.
Bug Fixes
- Fixed specific issues related to asynchronous I/O operations that could lead to unexpected behavior in rare edge cases.
- Resolved multiple memory leaks identified in prolonged usage scenarios, enhancing the stability and efficiency of the library.
Documentation and Community
- Updated documentation to reflect the latest API changes and added examples to demonstrate new features.
- Expanded community guidelines to facilitate more effective collaboration and contribution from developers.
Acknowledgements
This release has been made possible thanks to the contributions from our vibrant community. We appreciate all the efforts that have gone into making this release a success.
For a complete list of changes and detailed descriptions, please refer to our GitHub changelog.
Thank you for your continued support and contributions!
v1.3.0 rc
TCP Networking Library - Release v1.3.0
Welcome to the v1.3.0 release of our TCP networking library! This update brings several new features, enhancements, and bug fixes to improve the overall performance and functionality of our library. Below are the key changes introduced in this release:
New Features:
- VWeb Module: We've introduced a new
VWeb
module, which includes classes such asVHttpClient
,VHttpParser
,VHttpRequest
,VHttpResponse
,VHttpServer
,VWebSocketParser
, andVZlib
. These classes provide comprehensive functionalities for web development and HTTP/HTTPS communication. - VCore Updates: Added new files
VCoreDefine.h
,VLibuvInclude.h
,VMemoryPool.cpp
,VMemoryPool.h
,VThreadPool.cpp
, andVThreadPool.h
to enhance the core functionality and performance of the library.
Enhancements:
- Improved Networking: Various improvements have been made to the networking module, enhancing stability and performance.
- Memory Management: Optimized memory management with the introduction of memory pool and thread pool functionalities.
Bug Fixes:
- Resolved Issues: This release includes fixes for several reported issues and bugs, ensuring a more stable and reliable experience for our users.
Other Changes:
- Project Structure: Added
CMakeLists.txt
file for the VWeb module to improve project organization and build configuration.
For a detailed list of changes, please refer to the changelog.
We hope these updates enhance your experience with our library. As always, we welcome your feedback and contributions. Feel free to reach out with any questions or suggestions.
Happy coding!
v1.2.0
TCP Networking Library - Release v1.2.0
Welcome to the v1.2.0 release of our TCP networking library! This release brings several enhancements and additions to improve the functionality and flexibility of our library. Below are the key highlights:
VTcpServer Enhancements:
- New Connection Callback: Introducing a new callback mechanism
setNewConnectionCb
inVTcpServer
class, enabling users to define custom actions upon establishing a new connection. - IPv4 Listening: Now you can specify IPv4 addresses when listening for incoming connections using the
listenIpv4
method.
VTcpClient Updates:
- Connection Callback: Similar to the server,
VTcpClient
now supports a connection callbacksetConnectiondCb
, providing a way to handle connection events in client instances.
VTcpBase Improvements:
- Status Enumeration: Added a comprehensive set of status enumerations (
VTCP_WORKER_STATUS
) to better track the state of TCP workers, including connection status, data processing, and error conditions. - Idle Handling: Ability to start and close idle processing using
idleStart
andidleClose
methods respectively. - Callback Customization: Enhanced callback customization with methods like
setIdleCb
,setCloseCb
,setWriteCb
, andsetReadCb
, enabling finer control over various events. - Status Querying: Introducing
getStatus
method to retrieve the current status of TCP workers.
Other Enhancements:
- Addressing Customization: Ability to specify custom IP addresses with
listenIpv4
andconnect
methods for server and client instances respectively.
Bug Fixes and Optimizations:
- This release also includes several bug fixes and performance optimizations to ensure a smoother networking experience.
For a detailed list of changes, please refer to the changelog.
We hope these additions enhance your experience with our library. As always, we welcome your feedback and contributions. Feel free to reach out with any questions or suggestions.
Happy coding!
v1.1.0
VLibuv
Project Overview
VLibuv is a C++ wrapper based on libuv, designed to provide a convenient object-oriented programming interface and simplify the development of asynchronous, event-driven applications. By extending and encapsulating libuv's uv_handle_t
and uv_req_t
types, VLibuv makes them more compatible with C++'s object-oriented programming style.
Key Features
-
C++ Wrapper: Simplifies asynchronous programming and event handling with a C++ wrapper for libuv's raw types.
-
Extension of
uv_handle_t
anduv_req_t
: Facilitates management and operations through C++ inheritance. -
Extension of
uv_buf_t
: Enhances flexibility in buffer operations with extended methods. -
Derived Types: Introduces derived types, such as
VTcpService
, for rapid establishment of a TCP service. -
Compatibility: Maintains compatibility with all versions of libuv 1.0 series, incorporating new features and improvements promptly.
Building and Installing the Project with CMake
Follow these steps to build and install the project using CMake:
# Clone the libuv repository from https://github.com/libuv/libuv.
git clone https://github.com/libuv/libuv
# In the root directory of VLibuv, create a build directory
mkdir build && cd build
# Run CMake to configure the project
cmake ..
# Build the project using your preferred build tool (make, Visual Studio, etc.)
cmake --build .
# Install the project
cmake --install .
Example Usage
#include "VTimer.h"
// Timer callback function
void timerFunc(VTimer* vtimer) {
// Add logic to be executed when the timer triggers
// For example, output a message
std::cout << "Timer triggered!" << std::endl;
}
int main() {
// Create an event loop object
VLoop vloop;
// Create a timer object and associate it with the event loop
VTimer vtimer(&vloop);
// Start the timer with the callback function as timerFunc, interval of 1000 milliseconds, and repeat count of 0 for unlimited repeats
vtimer.start(timerFunc, 1000, 0);
// Enter the event loop and wait for events to occur
return vloop.exec();
}
v1.0.0
upload version 1.0.0
C++ 封装: 提供对 libuv 原始类型的 C++ 封装,简化异步编程和事件处理。
uv_handle_t 和 uv_req_t 等扩展: 通过 C++ 继承关系,扩展了每个 uv_handle_t 和 uv_req_t 类型和其他uv类型,方便管理和操作。
uv_buf_t 扩展: 扩展了对 uv_buf_t 类型的方法,包括 resize、clean、clone、拷贝构造等,提高了缓冲区操作的灵活性。
衍生类型: 在已有的 libuv 类型基础上,引入了一些衍生类型,如 VTcpService,可快速建立一个 TCP 服务,避免繁琐的操作。
兼容性: 保持与 libuv 1.0 所有系列版本的兼容性,同时跟踪官方更新,确保及时引入新特性和改进。
跨平台: 项目使用了cmake进行跨平台项目构建,Windows平台下测试生成vs2013和vs2022项目,Linux平台下生成makefile
Full Changelog: https://github.com/Antruly/VLibuv/commits/v1.x