A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
udp-socket-factory-impl.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
#ifndef UDP_SOCKET_FACTORY_IMPL_H
9
#define UDP_SOCKET_FACTORY_IMPL_H
10
11
#include "
udp-socket-factory.h
"
12
13
#include "ns3/ptr.h"
14
15
namespace
ns3
16
{
17
18
class
UdpL4Protocol;
19
20
/**
21
* \ingroup socket
22
* \ingroup udp
23
*
24
* \brief Object to create UDP socket instances
25
*
26
* This class implements the API for creating UDP sockets.
27
* It is a socket factory (deriving from class SocketFactory).
28
*/
29
class
UdpSocketFactoryImpl
:
public
UdpSocketFactory
30
{
31
public
:
32
UdpSocketFactoryImpl
();
33
~UdpSocketFactoryImpl
()
override
;
34
35
/**
36
* \brief Set the associated UDP L4 protocol.
37
* \param udp the UDP L4 protocol
38
*/
39
void
SetUdp
(
Ptr<UdpL4Protocol>
udp);
40
41
/**
42
* \brief Implements a method to create a Udp-based socket and return
43
* a base class smart pointer to the socket.
44
*
45
* \return smart pointer to Socket
46
*/
47
Ptr<Socket>
CreateSocket
()
override
;
48
49
protected
:
50
void
DoDispose
()
override
;
51
52
private
:
53
Ptr<UdpL4Protocol>
m_udp
;
//!< the associated UDP L4 protocol
54
};
55
56
}
// namespace ns3
57
58
#endif
/* UDP_SOCKET_FACTORY_IMPL_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::UdpSocketFactory
API to create UDP socket instances.
Definition
udp-socket-factory.h:31
ns3::UdpSocketFactoryImpl
Object to create UDP socket instances.
Definition
udp-socket-factory-impl.h:30
ns3::UdpSocketFactoryImpl::UdpSocketFactoryImpl
UdpSocketFactoryImpl()
Definition
udp-socket-factory-impl.cc:18
ns3::UdpSocketFactoryImpl::SetUdp
void SetUdp(Ptr< UdpL4Protocol > udp)
Set the associated UDP L4 protocol.
Definition
udp-socket-factory-impl.cc:29
ns3::UdpSocketFactoryImpl::~UdpSocketFactoryImpl
~UdpSocketFactoryImpl() override
Definition
udp-socket-factory-impl.cc:23
ns3::UdpSocketFactoryImpl::DoDispose
void DoDispose() override
Destructor implementation.
Definition
udp-socket-factory-impl.cc:41
ns3::UdpSocketFactoryImpl::CreateSocket
Ptr< Socket > CreateSocket() override
Implements a method to create a Udp-based socket and return a base class smart pointer to the socket.
Definition
udp-socket-factory-impl.cc:35
ns3::UdpSocketFactoryImpl::m_udp
Ptr< UdpL4Protocol > m_udp
the associated UDP L4 protocol
Definition
udp-socket-factory-impl.h:53
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
udp-socket-factory.h
src
internet
model
udp-socket-factory-impl.h
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0