A Discrete-Event Network Simulator
API
main-simple.cc File Reference
#include <iostream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
+ Include dependency graph for main-simple.cc:

Go to the source code of this file.

Functions

static void GenerateTraffic (Ptr< Socket > socket, uint32_t size)
 
static void PrintTraffic (Ptr< Socket > socket)
 
void RunSimulation (void)
 
static void SocketPrinter (Ptr< Socket > socket)
 

Function Documentation

◆ GenerateTraffic()

static void GenerateTraffic ( Ptr< Socket socket,
uint32_t  size 
)
static

Definition at line 30 of file main-simple.cc.

References ns3::Socket::Close(), ns3::Time::GetSeconds(), ns3::Simulator::Now(), ns3::Simulator::Schedule(), ns3::Seconds(), and ns3::Socket::Send().

Referenced by RunSimulation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintTraffic()

static void PrintTraffic ( Ptr< Socket socket)
static

Definition at line 55 of file main-simple.cc.

References ns3::MakeCallback(), ns3::Socket::SetRecvCallback(), and SocketPrinter().

Referenced by RunSimulation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RunSimulation()

◆ SocketPrinter()

static void SocketPrinter ( Ptr< Socket socket)
static

Definition at line 45 of file main-simple.cc.

References ns3::Time::GetSeconds(), ns3::Packet::GetSize(), ns3::Simulator::Now(), and ns3::Socket::Recv().

Referenced by PrintTraffic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: