8 #ifndef FACEBOOK_NETWORK_MAINTENANCE_UDP_CONNECTOR_H
9 #define FACEBOOK_NETWORK_MAINTENANCE_UDP_CONNECTOR_H
69 inline bool isSender()
const;
76 inline bool isReceiver()
const;
This class implements a recursive lock object.
Definition: Lock.h:31
This class is the base class for all maintenance connectors.
Definition: Maintenance.h:49
This class wraps an address number with 32 bits.
Definition: Address4.h:26
bool isValid() const
Returns whether this address hold a valid address.
Definition: Address4.h:154
This class implements a network connector between two maintenance managers using the UDP protocol.
Definition: MaintenanceUDPConnector.h:39
Port serverSourcePort_
The source port if this connector is a receiver.
Definition: MaintenanceUDPConnector.h:121
std::vector< uint8_t > Buffer
Definition of a vector holding bytes.
Definition: MaintenanceUDPConnector.h:45
Address4 clientTargetAddress_
The target address if this connector is a sender.
Definition: MaintenanceUDPConnector.h:115
PackagedUDPServer udpServer
The UDP server of this connector, used if this connector is a receiver.
Definition: MaintenanceUDPConnector.h:127
void configurateAsReceiver(const Port &port)
Configures this connector as receiver.
Lock lock_
The lock of this connector.
Definition: MaintenanceUDPConnector.h:112
void onReceiveUDPMessage(const Address4 &senderAddress, const Port &senderPort, const void *buffer, const size_t bufferSize, const PackagedUDPServer::MessageId messageId)
UDP data receive event function.
std::queue< Buffer > BufferQueue
Definition of a buffer queue.
Definition: MaintenanceUDPConnector.h:50
PackagedUDPClient udpClient
The UDP client of this connector, used if this connector is a sender.
Definition: MaintenanceUDPConnector.h:124
void configurateAsSender(const Address4 &targetAddress, Port &targetPort)
Configures this connector as sender.
bool isReceiver() const
Returns whether this connector is configured as receiver.
Definition: MaintenanceUDPConnector.h:142
~MaintenanceUDPConnector() override
Destructs a maintenance connector object.
BufferQueue bufferQueue_
The queue of maintenance data.
Definition: MaintenanceUDPConnector.h:130
MaintenanceUDPConnector()
Creates a new maintenance connector object.
void threadRun() override
Internal thread run function.
Port clientTargetPort_
The target port if this connector is a sender.
Definition: MaintenanceUDPConnector.h:118
bool isSender() const
Returns whether this connector is configured as sender.
Definition: MaintenanceUDPConnector.h:133
uint32_t MessageId
Definition of a message id.
Definition: PackagedSocket.h:185
This class implements a UDP client able to send larger messages as normally restricted by the UDP pro...
Definition: PackagedUDPClient.h:25
This class implements a packaged UDP server.
Definition: PackagedUDPServer.h:25
This class wraps a port number with 16 bits.
Definition: Port.h:26
bool isValid() const
Returns whether this port hold a non-zero value.
Definition: Port.h:131
This class implements a scoped lock object for recursive lock objects.
Definition: Lock.h:135
This class implements a thread.
Definition: Thread.h:115
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15