Fixes
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
## 📖 Description
|
## 📖 Description
|
||||||
IACore is a high-performance, battery-included C++20 foundation library designed to eliminate "dependency hell." It bundles essential systems—IPC, Logging, Networking, Compression, and Async Scheduling—into a single, coherent API.
|
IACore is a high-performance, battery-included C++20 foundation library designed to eliminate "dependency hell." It bundles essential systems—IPC, Logging, Networking, Compression, and Async Scheduling—into a single, coherent API.
|
||||||
|
|
||||||
Originally developed as the internal core for IASoft (PVT) LTD., it is now open-source to provide a standardized bedrock for C++ applications.
|
Originally developed as the internal core for IASoft (PVT) LTD., it is now open-source to provide a standardized bedrock for C++ applications where performance matters.
|
||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
|
|
||||||
@ -26,13 +26,13 @@ Originally developed as the internal core for IASoft (PVT) LTD., it is now open-
|
|||||||
* **💾 File I/O:** Memory-mapped file operations and optimized binary stream readers/writers.
|
* **💾 File I/O:** Memory-mapped file operations and optimized binary stream readers/writers.
|
||||||
* **📦 Compression:** Unified API for Zlib, Gzip, and Zstd.
|
* **📦 Compression:** Unified API for Zlib, Gzip, and Zstd.
|
||||||
* **📜 Logging:** Thread-safe, colored console and disk logging.
|
* **📜 Logging:** Thread-safe, colored console and disk logging.
|
||||||
* **⚡ Modern C++:** Heavily uses C++20 concepts, `std::span`, and `tl::expected` for error handling.
|
* **⚡ Modern C++:** Heavily utilizes modern C++20 concepts, `std::span`, and `tl::expected` for error handling.
|
||||||
|
|
||||||
## 🛠️ Integration
|
## 🛠️ Integration
|
||||||
|
|
||||||
IACore is built with CMake. You can include it in your project via `FetchContent` or by adding it as a subdirectory.
|
IACore is built with CMake. You can include it in your project via `FetchContent` or by adding it as a subdirectory.
|
||||||
|
|
||||||
Note: On Windows, you must have VCPKG installed and the VCPKG_ROOT environment variable set, for OpenSSL support.
|
**Note:** On Windows, you must have **VCPKG** installed and the `VCPKG_ROOT` environment variable set, for OpenSSL support.
|
||||||
|
|
||||||
### CMake Example
|
### CMake Example
|
||||||
```cmake
|
```cmake
|
||||||
@ -148,7 +148,7 @@ IACore is a dual-licensed product. To offer commercial licenses to proprietary s
|
|||||||
|
|
||||||
We are currently establishing a **Contributor License Agreement (CLA)** process. Once that is in place, we will open the core library for contributions, provided the contributor signs the CLA to assign copyright or grant an unlimited license to the project maintainers.
|
We are currently establishing a **Contributor License Agreement (CLA)** process. Once that is in place, we will open the core library for contributions, provided the contributor signs the CLA to assign copyright or grant an unlimited license to the project maintainers.
|
||||||
|
|
||||||
If you find a critical bug in `Src/`, please open an **Issue** rather than a PR, and the core team will implement the fix to ensure legal compliance.
|
If you find a critical bug in `Src/`, please open an **Issue** rather than a PR, and the core team will implement a fix ASAP.
|
||||||
|
|
||||||
## 🤝 Credits & Acknowledgements
|
## 🤝 Credits & Acknowledgements
|
||||||
**IACore** is an architectural effort by **IASoft (PVT) LTD.**, designed and maintained by its lead developers.
|
**IACore** is an architectural effort by **IASoft (PVT) LTD.**, designed and maintained by its lead developers.
|
||||||
|
|||||||
@ -123,7 +123,7 @@ namespace IACore
|
|||||||
fcntl(m_socket, F_SETFL, O_NONBLOCK);
|
fcntl(m_socket, F_SETFL, O_NONBLOCK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_recieveBuffer.resize(UINT16_MAX + 1);
|
m_receiveBuffer.resize(UINT16_MAX + 1);
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -136,8 +136,8 @@ namespace IACore
|
|||||||
RingBufferView::PacketHeader header;
|
RingBufferView::PacketHeader header;
|
||||||
|
|
||||||
// Process all available messages from Manager
|
// Process all available messages from Manager
|
||||||
while (MONI->Pop(header, Span<UINT8>(m_recieveBuffer.data(), m_recieveBuffer.size())))
|
while (MONI->Pop(header, Span<UINT8>(m_receiveBuffer.data(), m_receiveBuffer.size())))
|
||||||
OnPacket(header.ID, {m_recieveBuffer.data(), header.PayloadSize});
|
OnPacket(header.ID, {m_receiveBuffer.data(), header.PayloadSize});
|
||||||
|
|
||||||
UINT8 signal;
|
UINT8 signal;
|
||||||
const auto res = recv(m_socket, (CHAR *) &signal, 1, 0);
|
const auto res = recv(m_socket, (CHAR *) &signal, 1, 0);
|
||||||
@ -185,7 +185,7 @@ namespace IACore
|
|||||||
// SocketOps is smart enough to track multiple inits
|
// SocketOps is smart enough to track multiple inits
|
||||||
SocketOps::Initialize();
|
SocketOps::Initialize();
|
||||||
|
|
||||||
m_recieveBuffer.resize(UINT16_MAX + 1);
|
m_receiveBuffer.resize(UINT16_MAX + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
IPC_Manager::~IPC_Manager()
|
IPC_Manager::~IPC_Manager()
|
||||||
@ -266,8 +266,8 @@ namespace IACore
|
|||||||
|
|
||||||
RingBufferView::PacketHeader header;
|
RingBufferView::PacketHeader header;
|
||||||
|
|
||||||
while (node->MINO->Pop(header, Span<UINT8>(m_recieveBuffer.data(), m_recieveBuffer.size())))
|
while (node->MINO->Pop(header, Span<UINT8>(m_receiveBuffer.data(), m_receiveBuffer.size())))
|
||||||
OnPacket(nodeID, header.ID, {m_recieveBuffer.data(), header.PayloadSize});
|
OnPacket(nodeID, header.ID, {m_receiveBuffer.data(), header.PayloadSize});
|
||||||
|
|
||||||
UINT8 signal;
|
UINT8 signal;
|
||||||
const auto res = recv(node->DataSocket, (CHAR *) &signal, 1, 0);
|
const auto res = recv(node->DataSocket, (CHAR *) &signal, 1, 0);
|
||||||
@ -309,7 +309,7 @@ namespace IACore
|
|||||||
return MakeUnexpected("Failed to bind unique socket");
|
return MakeUnexpected("Failed to bind unique socket");
|
||||||
|
|
||||||
if (listen(session->ListenerSocket, 1) != 0)
|
if (listen(session->ListenerSocket, 1) != 0)
|
||||||
return MakeUnexpected("Failed to listen on unqiue socket");
|
return MakeUnexpected("Failed to listen on unique socket");
|
||||||
|
|
||||||
#if IA_PLATFORM_WINDOWS
|
#if IA_PLATFORM_WINDOWS
|
||||||
u_long mode = 1;
|
u_long mode = 1;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ namespace IACore
|
|||||||
private:
|
private:
|
||||||
String m_shmName;
|
String m_shmName;
|
||||||
PUINT8 m_sharedMemory{};
|
PUINT8 m_sharedMemory{};
|
||||||
Vector<UINT8> m_recieveBuffer;
|
Vector<UINT8> m_receiveBuffer;
|
||||||
SocketHandle m_socket{INVALID_SOCKET};
|
SocketHandle m_socket{INVALID_SOCKET};
|
||||||
|
|
||||||
UniquePtr<RingBufferView> MONI; // Manager Out, Node In
|
UniquePtr<RingBufferView> MONI; // Manager Out, Node In
|
||||||
@ -144,7 +144,7 @@ namespace IACore
|
|||||||
PURE_VIRTUAL(VOID OnPacket(IN NativeProcessID node, IN UINT16 packetID, IN Span<CONST UINT8> payload));
|
PURE_VIRTUAL(VOID OnPacket(IN NativeProcessID node, IN UINT16 packetID, IN Span<CONST UINT8> payload));
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vector<UINT8> m_recieveBuffer;
|
Vector<UINT8> m_receiveBuffer;
|
||||||
Vector<UniquePtr<NodeSession>> m_activeSessions;
|
Vector<UniquePtr<NodeSession>> m_activeSessions;
|
||||||
Vector<UniquePtr<NodeSession>> m_pendingSessions;
|
Vector<UniquePtr<NodeSession>> m_pendingSessions;
|
||||||
UnorderedMap<NativeProcessID, NodeSession *> m_activeSessionMap;
|
UnorderedMap<NativeProcessID, NodeSession *> m_activeSessionMap;
|
||||||
|
|||||||
Reference in New Issue
Block a user