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/string.h>
12#include <ns3/uinteger.h>
13
14namespace ns3
15{
16
21
27
32
35{
36 SetAttribute("RemoteAddress", AddressValue(address));
37}
38
40 : UdpClientHelper(address)
41{
42 SetAttribute("RemotePort", UintegerValue(port));
43}
44
49
50UdpTraceClientHelper::UdpTraceClientHelper(const Address& address, const std::string& filename)
52{
53 SetAttribute("RemoteAddress", AddressValue(address));
54 SetAttribute("TraceFilename", StringValue(filename));
55}
56
58 uint16_t port,
59 const std::string& filename)
60 : UdpTraceClientHelper(address, filename)
61{
62 SetAttribute("RemotePort", UintegerValue(port));
63}
64
65} // namespace ns3
a polymophic address class
Definition address.h:90
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:34
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:39
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.