A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
udp-client-server-helper.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
7 */
8
10
11#include <ns3/address-utils.h>
12#include <ns3/string.h>
13#include <ns3/uinteger.h>
14
15namespace ns3
16{
17
22
28
31{
32 SetAttribute("Local", AddressValue(address));
33}
34
39
42{
43 SetAttribute("Remote", AddressValue(address));
44}
45
47 : UdpClientHelper(addressUtils::ConvertToSocketAddress(address, port))
48{
49}
50
55
56UdpTraceClientHelper::UdpTraceClientHelper(const Address& address, const std::string& filename)
58{
59 SetAttribute("Remote", AddressValue(address));
60 SetAttribute("TraceFilename", StringValue(filename));
61}
62
64 uint16_t port,
65 const std::string& filename)
66 : UdpTraceClientHelper(addressUtils::ConvertToSocketAddress(address, port), filename)
67{
68}
69
70} // namespace ns3
a polymophic address class
Definition address.h:90
AttributeValue implementation for Address.
Definition address.h:275
A helper to make it easier to instantiate an application on a set of nodes.
void SetAttribute(const std::string &name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Hold variables of type string.
Definition string.h:45
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
UdpClientHelper()
Create UdpClientHelper which will make life easier for people trying to set up simulations with udp-c...
A Udp client.
Definition udp-client.h:38
Create a server application which waits for input UDP packets and uses the information carried into t...
UdpServerHelper()
Create UdpServerHelper which will make life easier for people trying to set up simulations with udp-c...
A UDP server, receives UDP packets from a remote host.
Definition udp-server.h:38
Create UdpTraceClient application which sends UDP packets based on a trace file of an MPEG4 stream.
UdpTraceClientHelper()
Create UdpTraceClientHelper which will make life easier for people trying to set up simulations with ...
A trace based streamer.
Hold an unsigned integer type.
Definition uinteger.h:34
uint16_t port
Definition dsdv-manet.cc:33
Every class exported by the ns3 library is enclosed in the ns3 namespace.