author | Brian Swenson <bswenson3@gatech.edu> |
Tue, 22 Apr 2014 11:52:55 -0400 | |
changeset 10694 | 4af272d94cfd |
parent 7176 | 9f2663992e99 |
permissions | -rw-r--r-- |
3578 | 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* This program is free software; you can redistribute it and/or modify |
|
4 |
* it under the terms of the GNU General Public License version 2 as |
|
5 |
* published by the Free Software Foundation; |
|
6 |
* |
|
7 |
* This program is distributed in the hope that it will be useful, |
|
8 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
10 |
* GNU General Public License for more details. |
|
11 |
* |
|
12 |
* You should have received a copy of the GNU General Public License |
|
13 |
* along with this program; if not, write to the Free Software |
|
14 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
15 |
*/ |
|
4283
5854cddf4493
Bugs 458, swap 2 LOC for 526
Craig Dowell <craigdo@ee.washington.edu>
parents:
3578
diff
changeset
|
16 |
#include "nsc-tcp-l4-protocol.h" |
3578 | 17 |
#include "nsc-tcp-socket-factory-impl.h" |
18 |
#include "ns3/socket.h" |
|
19 |
#include "ns3/assert.h" |
|
20 |
||
21 |
namespace ns3 { |
|
22 |
||
23 |
NscTcpSocketFactoryImpl::NscTcpSocketFactoryImpl () |
|
24 |
: m_tcp (0) |
|
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
25 |
{ |
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
26 |
} |
3578 | 27 |
NscTcpSocketFactoryImpl::~NscTcpSocketFactoryImpl () |
28 |
{ |
|
29 |
NS_ASSERT (m_tcp == 0); |
|
30 |
} |
|
31 |
||
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
32 |
void |
3578 | 33 |
NscTcpSocketFactoryImpl::SetTcp (Ptr<NscTcpL4Protocol> tcp) |
34 |
{ |
|
35 |
m_tcp = tcp; |
|
36 |
} |
|
37 |
||
38 |
Ptr<Socket> |
|
39 |
NscTcpSocketFactoryImpl::CreateSocket (void) |
|
40 |
{ |
|
41 |
return m_tcp->CreateSocket (); |
|
42 |
} |
|
43 |
||
44 |
void |
|
45 |
NscTcpSocketFactoryImpl::DoDispose (void) |
|
46 |
{ |
|
47 |
m_tcp = 0; |
|
48 |
TcpSocketFactory::DoDispose (); |
|
49 |
} |
|
50 |
||
51 |
} // namespace ns3 |