NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
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
v
w
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Enumerations
a
b
c
d
f
i
k
l
n
p
q
r
s
t
u
v
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
j
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
v
w
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
_
a
c
e
r
s
t
v
+
Enumerator
a
c
d
e
f
h
i
l
m
n
p
r
s
u
v
w
+
Related Functions
a
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
o
p
r
s
t
u
v
w
z
+
Functions
b
c
d
e
f
g
h
m
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
i
k
l
m
n
p
r
s
t
+
Typedefs
b
c
d
e
i
m
p
s
u
w
Enumerations
Enumerator
+
Macros
_
a
b
d
e
i
l
m
n
o
p
r
s
t
u
v
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
print_server.cpp
Go to the documentation of this file.
1
#include <iostream>
2
3
#include <
websocketpp/config/asio_no_tls.hpp
>
4
#include <
websocketpp/server.hpp
>
5
6
typedef
websocketpp::server<websocketpp::config::asio>
server
;
7
8
void
on_message
(
websocketpp::connection_hdl
,
server::message_ptr
msg) {
9
std::cout << msg->get_payload() << std::endl;
10
}
11
12
int
main
() {
13
server
print_server
;
14
15
print_server.
set_message_handler
(&
on_message
);
16
print_server.
set_access_channels
(
websocketpp::log::alevel::all
);
17
print_server.
set_error_channels
(
websocketpp::log::elevel::all
);
18
19
print_server.init_asio();
20
print_server.listen(9002);
21
print_server.
start_accept
();
22
23
print_server.run();
24
}
websocketpp::log::alevel::all
static level const all
Special aggregate value representing "all levels".
Definition:
levels.hpp:152
websocketpp::endpoint< connection< websocketpp::config::asio >, websocketpp::config::asio >::message_ptr
connection_type::message_ptr message_ptr
Type of message pointers that this endpoint uses.
Definition:
endpoint.hpp:70
websocketpp::connection_hdl
lib::weak_ptr< void > connection_hdl
A handle to uniquely identify a connection.
Definition:
connection_hdl.hpp:48
server
websocketpp::server< websocketpp::config::asio > server
Definition:
print_server.cpp:6
websocketpp::server::start_accept
void start_accept(lib::error_code &ec)
Starts the server's async connection acceptance loop (exception free)
Definition:
server_endpoint.hpp:121
websocketpp::server< websocketpp::config::asio >
websocketpp::endpoint::set_access_channels
void set_access_channels(log::level channels)
Set Access logging channel.
Definition:
endpoint.hpp:220
asio_no_tls.hpp
websocketpp::endpoint::set_error_channels
void set_error_channels(log::level channels)
Set Error logging channel.
Definition:
endpoint.hpp:242
on_message
void on_message(websocketpp::connection_hdl, server::message_ptr msg)
Definition:
print_server.cpp:8
print_server
Definition:
associative_storage.cpp:19
websocketpp::endpoint::set_message_handler
void set_message_handler(message_handler h)
Definition:
endpoint.hpp:322
websocketpp::log::elevel::all
static level const all
Special aggregate value representing "all levels".
Definition:
levels.hpp:80
server.hpp
main
int main()
Definition:
print_server.cpp:12
ndnSIM
NFD
websocketpp
examples
print_server
print_server.cpp
Generated on Fri May 6 2022 12:34:14 for ndnSIM by
1.8.13