NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
tcp-transport.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_TRANSPORT_TCP_TRANSPORT_HPP
23
#define NDN_TRANSPORT_TCP_TRANSPORT_HPP
24
25
#include "
transport.hpp
"
26
#include "../util/config-file.hpp"
27
28
namespace
boost
{
29
namespace
asio {
30
namespace
ip
{
31
class
tcp;
32
}
// namespace ip
33
}
// namespace asio
34
}
// namespace boost
35
36
namespace
ndn
{
37
38
template
<
typename
BaseTransport,
typename
Protocol>
39
class
StreamTransportImpl;
40
41
template
<
typename
BaseTransport,
typename
Protocol>
42
class
StreamTransportWithResolverImpl;
43
46
class
TcpTransport
:
public
Transport
47
{
48
public
:
49
explicit
50
TcpTransport
(
const
std::string& host,
const
std::string& port =
"6363"
);
51
52
~
TcpTransport
();
53
54
virtual
void
55
connect(boost::asio::io_service& ioService,
56
const
ReceiveCallback
& receiveCallback)
override
;
57
58
virtual
void
59
close()
override
;
60
61
virtual
void
62
pause()
override
;
63
64
virtual
void
65
resume()
override
;
66
67
virtual
void
68
send(
const
Block
& wire)
override
;
69
70
virtual
void
71
send(
const
Block
& header,
const
Block
& payload)
override
;
72
76
static
shared_ptr<TcpTransport>
77
create(
const
std::string& uri);
78
79
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
80
static
std::pair<std::string, std::string>
81
getSocketHostAndPortFromUri(
const
std::string& uri);
82
83
private
:
84
std::string m_host;
85
std::string m_port;
86
87
typedef
StreamTransportWithResolverImpl<TcpTransport, boost::asio::ip::tcp>
Impl
;
88
friend
class
StreamTransportImpl
<
TcpTransport
,
boost
::asio::ip::tcp>;
89
friend class
StreamTransportWithResolverImpl
<TcpTransport, boost::asio::ip::tcp>;
90
shared_ptr<Impl> m_impl;
91
};
92
93
}
// namespace ndn
94
95
#endif // NDN_TRANSPORT_TCP_TRANSPORT_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
boost
Copyright (c) 2013-2016 Regents of the University of California.
Definition:
ndn-content-store.hpp:209
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
transport.hpp
ndn::TcpTransport
a transport using TCP socket
Definition:
tcp-transport.hpp:46
ndn::StreamTransportImpl
implementation detail of a Boost.Asio-based stream-oriented transport
Definition:
stream-transport-impl.hpp:38
ndn::StreamTransportWithResolverImpl
implementation detail of a Boost.Asio-based stream-oriented transport with resolver support ...
Definition:
stream-transport-with-resolver-impl.hpp:33
nfd::face::TcpTransport
TcpTransport
Definition:
tcp-transport.cpp:31
ndn::Transport
provides TLV-block delivery service
Definition:
transport.hpp:40
boost::asio::ip
Definition:
tcp-transport.hpp:30
ndn::Transport::ReceiveCallback
function< void(const Block &wire)> ReceiveCallback
Definition:
transport.hpp:52
ndnSIM
ndn-cxx
src
transport
tcp-transport.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13