MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ send()

bool MayaFlux::Portal::Network::NetworkSink::send ( ByteView  data) const

Send bytes through this sink's endpoint.

Parameters
dataRead-only byte view of the payload.
Returns
true if the send was accepted by the backend.

For UDP: non-blocking sendto() to the address in StreamConfig::endpoint. For TCP: writes a framed message; may block briefly on backpressure.

Definition at line 100 of file NetworkSink.cpp.

101{
102 if (m_endpoint_id == 0 || !m_service) {
103 return false;
104 }
105 return m_service->send(m_endpoint_id, data.data(), data.size());
106}
Registry::Service::NetworkService * m_service
std::function< bool(uint64_t endpoint_id, const uint8_t *data, size_t size)> send
Send data through an endpoint.

References m_endpoint_id, m_service, and MayaFlux::Registry::Service::NetworkService::send.