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
Classes
Files
File List
File Members
unix-stream-transport.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
unix-stream-transport.hpp
"
27
28
namespace
nfd
{
29
namespace
face
{
30
31
NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE
(
StreamTransport
,
UnixStreamTransport::protocol
,
32
"UnixStreamTransport"
);
33
34
UnixStreamTransport::UnixStreamTransport
(
protocol::socket
&&
socket
)
35
:
StreamTransport
(
std
::move(
socket
))
36
{
37
static_assert(
38
std::is_same<std::remove_cv<protocol::socket::native_handle_type>::type,
int
>::
value
,
39
"The native handle type for UnixStreamTransport sockets must be 'int'"
40
);
41
42
this->
setLocalUri
(
FaceUri
(
m_socket
.local_endpoint()));
43
this->
setRemoteUri
(
FaceUri::fromFd
(
m_socket
.native_handle()));
44
this->
setScope
(
ndn::nfd::FACE_SCOPE_LOCAL
);
45
this->
setPersistency
(
ndn::nfd::FACE_PERSISTENCY_ON_DEMAND
);
46
this->
setLinkType
(
ndn::nfd::LINK_TYPE_POINT_TO_POINT
);
47
this->
setMtu
(
MTU_UNLIMITED
);
48
49
NFD_LOG_FACE_INFO
(
"Creating transport"
);
50
}
51
52
}
// namespace face
53
}
// namespace nfd
nfd::face::Transport::setPersistency
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
Definition:
transport.cpp:151
ndn::FaceUri::fromFd
static FaceUri fromFd(int fd)
create fd FaceUri from file descriptor
Definition:
face-uri.cpp:155
NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE
#define NFD_LOG_INCLASS_TEMPLATE_SPECIALIZATION_DEFINE(cls, specialization, name)
Definition:
logger.hpp:46
nfd::face::MTU_UNLIMITED
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
Definition:
transport.hpp:95
nfd::face::Transport::setRemoteUri
void setRemoteUri(const FaceUri &uri)
Definition:
transport.hpp:396
ndn::nfd::LINK_TYPE_POINT_TO_POINT
link is point-to-point
Definition:
nfd-constants.hpp:59
std
STL namespace.
nfd::face::StreamTransport< boost::asio::local::stream_protocol >::protocol
boost::asio::local::stream_protocol protocol
Definition:
stream-transport.hpp:45
nfd::face::Transport::setLinkType
void setLinkType(ndn::nfd::LinkType linkType)
Definition:
transport.hpp:426
nfd::face::Transport::setMtu
void setMtu(ssize_t mtu)
Definition:
transport.hpp:438
nfd::face::StreamTransport
Implements Transport for stream-based protocols.
Definition:
stream-transport.hpp:42
nfd::face::StreamTransport< boost::asio::local::stream_protocol >::m_socket
protocol::socket m_socket
Definition:
stream-transport.hpp:91
nfd::face::Transport::setScope
void setScope(ndn::nfd::FaceScope scope)
Definition:
transport.hpp:408
NFD_LOG_FACE_INFO
#define NFD_LOG_FACE_INFO(msg)
Log a message at INFO level.
Definition:
face-log.hpp:85
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
face
nfd::face::Transport::setLocalUri
void setLocalUri(const FaceUri &uri)
Definition:
transport.hpp:384
nfd::face::UnixStreamTransport::UnixStreamTransport
UnixStreamTransport(protocol::socket &&socket)
Definition:
unix-stream-transport.cpp:34
ndn::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:43
ndn::nfd::FACE_PERSISTENCY_ON_DEMAND
face is on-demand
Definition:
nfd-constants.hpp:48
ndn::nfd::FACE_SCOPE_LOCAL
face is local
Definition:
nfd-constants.hpp:37
unix-stream-transport.hpp
websocketpp::transport::asio::socket::error::socket
Catch-all error for socket component errors that don't fit in other categories.
Definition:
base.hpp:83
websocketpp::session::state::value
value
Definition:
connection.hpp:179
ndnSIM
NFD
daemon
face
unix-stream-transport.cpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11