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
tcp-socket-factory-impl.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 Georgia Tech Research Corporation
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Raj Bhattacharjea <raj.b@gatech.edu>
7
*/
8
#include "
tcp-socket-factory-impl.h
"
9
10
#include "
tcp-l4-protocol.h
"
11
12
#include "ns3/assert.h"
13
#include "ns3/socket.h"
14
15
namespace
ns3
16
{
17
18
TcpSocketFactoryImpl::TcpSocketFactoryImpl
()
19
: m_tcp(nullptr)
20
{
21
}
22
23
TcpSocketFactoryImpl::~TcpSocketFactoryImpl
()
24
{
25
NS_ASSERT
(!
m_tcp
);
26
}
27
28
void
29
TcpSocketFactoryImpl::SetTcp
(
Ptr<TcpL4Protocol>
tcp)
30
{
31
m_tcp
= tcp;
32
}
33
34
Ptr<Socket>
35
TcpSocketFactoryImpl::CreateSocket
()
36
{
37
return
m_tcp
->
CreateSocket
();
38
}
39
40
void
41
TcpSocketFactoryImpl::DoDispose
()
42
{
43
m_tcp
=
nullptr
;
44
TcpSocketFactory::DoDispose
();
45
}
46
47
}
// namespace ns3
ns3::Object::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition
object.cc:433
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Socket::CreateSocket
static Ptr< Socket > CreateSocket(Ptr< Node > node, TypeId tid)
This method wraps the creation of sockets that is performed on a given node by a SocketFactory specif...
Definition
socket.cc:61
ns3::TcpSocketFactoryImpl::SetTcp
void SetTcp(Ptr< TcpL4Protocol > tcp)
Set the associated TCP L4 protocol.
Definition
tcp-socket-factory-impl.cc:29
ns3::TcpSocketFactoryImpl::CreateSocket
Ptr< Socket > CreateSocket() override
Definition
tcp-socket-factory-impl.cc:35
ns3::TcpSocketFactoryImpl::TcpSocketFactoryImpl
TcpSocketFactoryImpl()
Definition
tcp-socket-factory-impl.cc:18
ns3::TcpSocketFactoryImpl::m_tcp
Ptr< TcpL4Protocol > m_tcp
the associated TCP L4 protocol
Definition
tcp-socket-factory-impl.h:47
ns3::TcpSocketFactoryImpl::DoDispose
void DoDispose() override
Destructor implementation.
Definition
tcp-socket-factory-impl.cc:41
ns3::TcpSocketFactoryImpl::~TcpSocketFactoryImpl
~TcpSocketFactoryImpl() override
Definition
tcp-socket-factory-impl.cc:23
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition
assert.h:55
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-l4-protocol.h
tcp-socket-factory-impl.h
src
internet
model
tcp-socket-factory-impl.cc
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0