|
Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
|
Statically buffered, zero-heap UDP communication channel for distributed Corium nodes. More...
#include <StaticUdpChannel.hpp>
Collaboration diagram for corium::net::StaticUdpChannel< MaxPacketSize >:Public Member Functions | |
| void | close () noexcept |
| Close underlying socket. | |
| bool | isOpen () const noexcept |
| Returns true if socket is open and bound. | |
| int | nativeHandle () const noexcept |
| Native socket file descriptor or handle. | |
| bool | openAndBind (uint16_t port=0, const char *ip="0.0.0.0") noexcept |
| Open UDP socket and bind to a local port and IP address. | |
| StaticUdpChannel & | operator= (const StaticUdpChannel &)=delete |
| StaticUdpChannel & | operator= (StaticUdpChannel &&other) noexcept |
| bool | receive (std::span< uint8_t > bufferOut, size_t &bytesReceivedOut) noexcept |
| Receive raw bytes from incoming UDP datagram. | |
| template<typename EventVariant , typename Sink > | |
| bool | receiveAndPush (Sink &sink, EventPriority priority=EventPriority::Normal) noexcept |
| Receive a WirePacket and deserialize directly into a Corium EventSink. | |
| template<typename Event , typename EventVariant > | |
| bool | sendEvent (const char *ip, uint16_t port, const Event &event) noexcept |
| Serialize and send a typed event over UDP using Corium WirePacket framing. | |
| bool | sendTo (const char *ip, uint16_t port, std::span< const uint8_t > data) noexcept |
| Send raw payload to target UDP endpoint. | |
| bool | setNonBlocking (bool nonBlocking=true) noexcept |
| Set socket non-blocking mode. | |
| constexpr | StaticUdpChannel () noexcept=default |
| StaticUdpChannel (const StaticUdpChannel &)=delete | |
| StaticUdpChannel (StaticUdpChannel &&other) noexcept | |
| ~StaticUdpChannel () | |
Statically buffered, zero-heap UDP communication channel for distributed Corium nodes.
| MaxPacketSize | Maximum UDP datagram payload size in bytes (default: 512). |
|
constexprdefaultnoexcept |
|
inline |
Here is the call graph for this function:
|
delete |
|
inlinenoexcept |
|
inlinenoexcept |
Close underlying socket.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Returns true if socket is open and bound.
|
inlinenoexcept |
Native socket file descriptor or handle.
|
inlinenoexcept |
Open UDP socket and bind to a local port and IP address.
| port | Local port to bind to (0 for ephemeral). |
| ip | Local interface IP address (default: "0.0.0.0"). |
Here is the call graph for this function:
Here is the caller graph for this function:
|
delete |
|
inlinenoexcept |
Here is the call graph for this function:
|
inlinenoexcept |
Receive raw bytes from incoming UDP datagram.
| bufferOut | Output buffer. |
| bytesReceivedOut | Number of bytes received. |
Here is the caller graph for this function:
|
inlinenoexcept |
Receive a WirePacket and deserialize directly into a Corium EventSink.
| EventVariant | Variant list of all supported events. |
| Sink | Target EventSink or EventBus. |
| sink | Target sink. |
| priority | Priority to assign to the deserialized event. |
Here is the call graph for this function:
|
inlinenoexcept |
Serialize and send a typed event over UDP using Corium WirePacket framing.
| Event | Concrete event type (must be trivially copyable). |
| EventVariant | Variant list for type indexing. |
| ip | Target IPv4 address. |
| port | Target port. |
| event | Event instance to transmit. |
Here is the call graph for this function:
|
inlinenoexcept |
Send raw payload to target UDP endpoint.
| ip | Target IPv4 address string (e.g. "127.0.0.1"). |
| port | Target port. |
| data | Byte payload to transmit. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
Set socket non-blocking mode.
| nonBlocking | true for non-blocking I/O. |