|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
19 #ifndef UDP_ECHO_CLIENT_H
20 #define UDP_ECHO_CLIENT_H
22 #include "ns3/application.h"
23 #include "ns3/event-id.h"
25 #include "ns3/ipv4-address.h"
26 #include "ns3/traced-callback.h"
99 void SetFill (std::string fill);
113 void SetFill (uint8_t fill, uint32_t dataSize);
131 void SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize);
a unique identifier for an interface.
An identifier for simulation events.
uint16_t m_peerPort
Remote peer port.
void SetDataSize(uint32_t dataSize)
Set the data size of the packet (the number of bytes that are sent as data to the server).
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Send(void)
Send a packet.
void HandleRead(Ptr< Socket > socket)
Handle a packet reception.
void SetRemote(Address ip, uint16_t port)
set the remote address and port
uint32_t m_size
Size of the sent packet.
void ScheduleTransmit(Time dt)
Schedule the next packet transmission.
uint8_t * m_data
packet payload data
EventId m_sendEvent
Event to send the next packet.
a polymophic address class
TracedCallback< Ptr< const Packet > > m_txTrace
Callbacks for tracing the packet Tx events.
uint32_t m_count
Maximum number of packets the application will send.
TracedCallback< Ptr< const Packet > > m_rxTrace
Callbacks for tracing the packet Rx events.
uint32_t m_sent
Counter for sent packets.
Simulation virtual time values and global simulation resolution.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< Socket > m_socket
Socket.
virtual void StartApplication(void)
Application specific startup code.
virtual void StopApplication(void)
Application specific shutdown code.
virtual void DoDispose(void)
Destructor implementation.
TracedCallback< Ptr< const Packet >, const Address &, const Address & > m_txTraceWithAddresses
Callbacks for tracing the packet Tx events, includes source and destination addresses.
Forward calls to a chain of Callback.
void SetFill(std::string fill)
Set the data fill of the packet (what is sent as data to the server) to the zero-terminated contents ...
TracedCallback< Ptr< const Packet >, const Address &, const Address & > m_rxTraceWithAddresses
Callbacks for tracing the packet Rx events, includes source and destination addresses.
The base class for all ns3 applications.
uint32_t GetDataSize(void) const
Get the number of data bytes that will be sent to the server.
Time m_interval
Packet inter-send time.
uint32_t m_dataSize
packet payload size (must be equal to m_size)
Address m_peerAddress
Remote peer address.