A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-socket-factory-impl.h
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#ifndef TCP_SOCKET_FACTORY_IMPL_H
9#define TCP_SOCKET_FACTORY_IMPL_H
10
11#include "tcp-socket-factory.h"
12
13#include "ns3/ptr.h"
14
15namespace ns3
16{
17
18class TcpL4Protocol;
19
20/**
21 * \ingroup socket
22 * \ingroup tcp
23 *
24 * \brief socket factory implementation for native ns-3 TCP
25 *
26 *
27 * This class serves to create sockets of the TcpSocketBase type.
28 */
30{
31 public:
33 ~TcpSocketFactoryImpl() override;
34
35 /**
36 * \brief Set the associated TCP L4 protocol.
37 * \param tcp the TCP L4 protocol
38 */
39 void SetTcp(Ptr<TcpL4Protocol> tcp);
40
41 Ptr<Socket> CreateSocket() override;
42
43 protected:
44 void DoDispose() override;
45
46 private:
47 Ptr<TcpL4Protocol> m_tcp; //!< the associated TCP L4 protocol
48};
49
50} // namespace ns3
51
52#endif /* TCP_SOCKET_FACTORY_IMPL_H */
Smart pointer class similar to boost::intrusive_ptr.
API to create TCP socket instances.
socket factory implementation for native ns-3 TCP
void SetTcp(Ptr< TcpL4Protocol > tcp)
Set the associated TCP L4 protocol.
Ptr< Socket > CreateSocket() override
Ptr< TcpL4Protocol > m_tcp
the associated TCP L4 protocol
void DoDispose() override
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.