|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Backend network transport service interface. More...
#include <NetworkService.hpp>
Collaboration diagram for MayaFlux::Registry::Service::NetworkService:Public Attributes | |
| std::function< void(uint64_t endpoint_id)> | close_endpoint |
| Close an endpoint. | |
| std::function< std::vector< Core::EndpointInfo >()> | get_all_endpoints |
| List all open endpoints across all backends. | |
| std::function< Core::EndpointState(uint64_t endpoint_id)> | get_endpoint_state |
| Query endpoint state. | |
| std::function< uint64_t(const Core::EndpointInfo &info)> | open_endpoint |
| Open a network endpoint on the appropriate backend. | |
| std::function< bool(uint64_t endpoint_id, const uint8_t *data, size_t size)> | send |
| Send data through an endpoint. | |
| std::function< bool(uint64_t endpoint_id, const uint8_t *data, size_t size, const std::string &address, uint16_t port)> | send_to |
| Send data to a specific address through an endpoint. | |
| std::function< void(uint64_t endpoint_id, std::function< void(uint64_t, const uint8_t *, size_t, std::string_view)> callback)> | set_endpoint_receive_callback |
| Register a per-endpoint receive callback. | |
Backend network transport service interface.
Registered into BackendRegistry by NetworkSubsystem. Follows the same service pattern as BufferService, ComputeService, DisplayService, and InputService. Enables any component (nodes, buffer processors, InputManager) to send and receive data over the network without coupling to NetworkSubsystem internals.
Consumption model: callbacks. The receive callback fires on the backend's receive thread. Consumers that need to integrate with coroutine-based workflows can bridge via Kriya::ProcessingGate (poll a flag the callback sets) or, when implemented, via a dedicated Kriya::NetworkReceive awaiter modelled on EventAwaiter.
The coroutine surface is deliberately absent from this initial version. The pattern exists (EventAwaiter), the integration point is clear (set_endpoint_receive_callback resumes a suspended handle), but the awaiter should be added when a concrete use case demands it, not speculatively.
Definition at line 49 of file NetworkService.hpp.