Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
238c743b
Commit
238c743b
authored
Jan 16, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup/format for PFCP/UDP
parent
6937f31e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10711 additions
and
5732 deletions
+10711
-5732
src/pfcp/3gpp_29.244.cpp
src/pfcp/3gpp_29.244.cpp
+1175
-977
src/pfcp/3gpp_29.244.hpp
src/pfcp/3gpp_29.244.hpp
+2267
-1722
src/pfcp/msg_pfcp.hpp
src/pfcp/msg_pfcp.hpp
+6478
-2505
src/pfcp/pfcp.cpp
src/pfcp/pfcp.cpp
+506
-319
src/pfcp/pfcp.hpp
src/pfcp/pfcp.hpp
+128
-74
src/udp/udp.cpp
src/udp/udp.cpp
+75
-66
src/udp/udp.hpp
src/udp/udp.hpp
+82
-69
No files found.
src/pfcp/3gpp_29.244.cpp
View file @
238c743b
This diff is collapsed.
Click to expand it.
src/pfcp/3gpp_29.244.hpp
View file @
238c743b
This diff is collapsed.
Click to expand it.
src/pfcp/msg_pfcp.hpp
View file @
238c743b
This diff is collapsed.
Click to expand it.
src/pfcp/pfcp.cpp
View file @
238c743b
This diff is collapsed.
Click to expand it.
src/pfcp/pfcp.hpp
View file @
238c743b
This diff is collapsed.
Click to expand it.
src/udp/udp.cpp
View file @
238c743b
...
...
@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
file
*
except in compliance with the License.
*
You may obtain a copy of the
License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*
file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
...
...
@@ -31,143 +31,152 @@
#include <cstdlib>
//------------------------------------------------------------------------------
void
udp_application
::
handle_receive
(
char
*
recv_buffer
,
const
std
::
size_t
bytes_transferred
,
const
endpoint
&
r_endpoint
)
{
Logger
::
udp
().
warn
(
"Missing implementation of interface udp_application
\n
"
);
void
udp_application
::
handle_receive
(
char
*
recv_buffer
,
const
std
::
size_t
bytes_transferred
,
const
endpoint
&
r_endpoint
)
{
Logger
::
udp
().
warn
(
"Missing implementation of interface udp_application
\n
"
);
}
//------------------------------------------------------------------------------
void
udp_application
::
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
)
{
Logger
::
udp
().
warn
(
"Missing implementation of interface udp_application
\n
"
);
void
udp_application
::
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
)
{
Logger
::
udp
().
warn
(
"Missing implementation of interface udp_application
\n
"
);
}
//------------------------------------------------------------------------------
static
std
::
string
string_to_hex
(
const
std
::
string
&
input
)
{
static
const
char
*
const
lut
=
"0123456789ABCDEF"
;
size_t
len
=
input
.
length
();
std
::
string
output
;
output
.
reserve
(
2
*
len
);
for
(
size_t
i
=
0
;
i
<
len
;
++
i
)
{
const
unsigned
char
c
=
input
[
i
];
output
.
push_back
(
lut
[
c
>>
4
]);
output
.
push_back
(
lut
[
c
&
15
]);
}
return
output
;
static
std
::
string
string_to_hex
(
const
std
::
string
&
input
)
{
static
const
char
*
const
lut
=
"0123456789ABCDEF"
;
size_t
len
=
input
.
length
();
std
::
string
output
;
output
.
reserve
(
2
*
len
);
for
(
size_t
i
=
0
;
i
<
len
;
++
i
)
{
const
unsigned
char
c
=
input
[
i
];
output
.
push_back
(
lut
[
c
>>
4
]);
output
.
push_back
(
lut
[
c
&
15
]);
}
return
output
;
}
//------------------------------------------------------------------------------
void
udp_server
::
udp_read_loop
(
const
util
::
thread_sched_params
&
sched_params
)
{
endpoint
r_endpoint
=
{};
size_t
bytes_received
=
0
;
void
udp_server
::
udp_read_loop
(
const
util
::
thread_sched_params
&
sched_params
)
{
endpoint
r_endpoint
=
{};
size_t
bytes_received
=
0
;
sched_params
.
apply
(
TASK_NONE
,
Logger
::
udp
());
while
(
1
)
{
r_endpoint
.
addr_storage_len
=
sizeof
(
struct
sockaddr_storage
);
if
((
bytes_received
=
recvfrom
(
socket_
,
recv_buffer_
,
UDP_RECV_BUFFER_SIZE
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
&
r_endpoint
.
addr_storage_len
))
>
0
)
{
if
((
bytes_received
=
recvfrom
(
socket_
,
recv_buffer_
,
UDP_RECV_BUFFER_SIZE
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
&
r_endpoint
.
addr_storage_len
))
>
0
)
{
app_
->
handle_receive
(
recv_buffer_
,
bytes_received
,
r_endpoint
);
}
else
{
Logger
::
udp
().
error
(
"Recvfrom failed %s
\n
"
,
strerror
(
errno
));
Logger
::
udp
().
error
(
"Recvfrom failed %s
\n
"
,
strerror
(
errno
));
}
}
}
//------------------------------------------------------------------------------
int
udp_server
::
create_socket
(
const
struct
in_addr
&
address
,
const
uint16_t
port
)
{
struct
sockaddr_in
addr
=
{};
int
sd
=
0
;
int
udp_server
::
create_socket
(
const
struct
in_addr
&
address
,
const
uint16_t
port
)
{
struct
sockaddr_in
addr
=
{};
int
sd
=
0
;
/*
* Create UDP socket
*/
if
((
sd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
))
<
0
)
{
if
((
sd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
))
<
0
)
{
/*
* Socket creation has failed...
*/
Logger
::
udp
().
error
(
"Socket creation failed (%s)
\n
"
,
strerror
(
errno
));
Logger
::
udp
().
error
(
"Socket creation failed (%s)
\n
"
,
strerror
(
errno
));
return
errno
;
}
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
port
);
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
port
);
addr
.
sin_addr
.
s_addr
=
address
.
s_addr
;
std
::
string
ipv4
=
conv
::
toString
(
address
);
Logger
::
udp
().
debug
(
"Creating new listen socket on address %s and port %"
PRIu16
" "
,
ipv4
.
c_str
(),
port
);
Logger
::
udp
().
debug
(
"Creating new listen socket on address %s and port %"
PRIu16
" "
,
ipv4
.
c_str
(),
port
);
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
struct
sockaddr_in
))
<
0
)
{
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
struct
sockaddr_in
))
<
0
)
{
/*
* Bind failed
*/
Logger
::
udp
().
error
(
"Socket bind failed (%s) for address %s and port %"
PRIu16
" "
,
strerror
(
errno
),
ipv4
.
c_str
(),
port
);
close
(
sd
);
Logger
::
udp
().
error
(
"Socket bind failed (%s) for address %s and port %"
PRIu16
" "
,
strerror
(
errno
),
ipv4
.
c_str
(),
port
);
close
(
sd
);
return
errno
;
}
sa_family
=
AF_INET
;
return
sd
;
}
//------------------------------------------------------------------------------
int
udp_server
::
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
)
{
struct
sockaddr_in6
addr
=
{};
int
sd
=
0
;
int
udp_server
::
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
)
{
struct
sockaddr_in6
addr
=
{};
int
sd
=
0
;
/*
* Create UDP socket
*/
if
((
sd
=
socket
(
AF_INET6
,
SOCK_DGRAM
,
IPPROTO_UDP
))
<
0
)
{
if
((
sd
=
socket
(
AF_INET6
,
SOCK_DGRAM
,
IPPROTO_UDP
))
<
0
)
{
/*
* Socket creation has failed...
*/
Logger
::
udp
().
error
(
"Socket creation failed (%s)
\n
"
,
strerror
(
errno
));
Logger
::
udp
().
error
(
"Socket creation failed (%s)
\n
"
,
strerror
(
errno
));
return
errno
;
}
addr
.
sin6_family
=
AF_INET6
;
addr
.
sin6_port
=
htons
(
port
);
addr
.
sin6_addr
=
address
;
addr
.
sin6_port
=
htons
(
port
);
addr
.
sin6_addr
=
address
;
std
::
string
ipv6
=
conv
::
toString
(
address
);
Logger
::
udp
().
debug
(
"Creating new listen socket on address %s and port %"
PRIu16
"
\n
"
,
ipv6
.
c_str
(),
port
);
Logger
::
udp
().
debug
(
"Creating new listen socket on address %s and port %"
PRIu16
"
\n
"
,
ipv6
.
c_str
(),
port
);
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
struct
sockaddr_in6
))
<
0
)
{
if
(
bind
(
sd
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
struct
sockaddr_in6
))
<
0
)
{
/*
* Bind failed
*/
Logger
::
udp
().
error
(
"Socket bind failed (%s) for address %s and port %"
PRIu16
"
\n
"
,
strerror
(
errno
),
ipv6
.
c_str
(),
port
);
close
(
sd
);
Logger
::
udp
().
error
(
"Socket bind failed (%s) for address %s and port %"
PRIu16
"
\n
"
,
strerror
(
errno
),
ipv6
.
c_str
(),
port
);
close
(
sd
);
return
errno
;
}
sa_family
=
AF_INET6
;
return
sd
;
}
//------------------------------------------------------------------------------
int
udp_server
::
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
)
{
int
udp_server
::
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
)
{
unsigned
char
buf_in_addr
[
sizeof
(
struct
in6_addr
)];
if
(
inet_pton
(
AF_INET
,
address
,
buf_in_addr
)
==
1
)
{
struct
in_addr
addr4
=
{};
memcpy
(
&
addr4
,
buf_in_addr
,
sizeof
(
struct
in_addr
));
if
(
inet_pton
(
AF_INET
,
address
,
buf_in_addr
)
==
1
)
{
struct
in_addr
addr4
=
{};
memcpy
(
&
addr4
,
buf_in_addr
,
sizeof
(
struct
in_addr
));
return
create_socket
(
addr4
,
port_num
);
}
else
if
(
inet_pton
(
AF_INET6
,
address
,
buf_in_addr
)
==
1
)
{
}
else
if
(
inet_pton
(
AF_INET6
,
address
,
buf_in_addr
)
==
1
)
{
struct
in6_addr
addr6
=
{};
memcpy
(
&
addr6
,
buf_in_addr
,
sizeof
(
struct
in6_addr
));
memcpy
(
&
addr6
,
buf_in_addr
,
sizeof
(
struct
in6_addr
));
return
create_socket
(
addr6
,
port_num
);
}
else
{
Logger
::
udp
().
error
(
"udp_server::create_socket(%s:%d)"
,
address
,
port_num
);
Logger
::
udp
().
error
(
"udp_server::create_socket(%s:%d)"
,
address
,
port_num
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
500
));
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"UDP socket creation failed!"
);
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"UDP socket creation failed!"
);
}
}
//------------------------------------------------------------------------------
void
udp_server
::
start_receive
(
udp_application
*
app
,
const
util
::
thread_sched_params
&
sched_params
)
{
void
udp_server
::
start_receive
(
udp_application
*
app
,
const
util
::
thread_sched_params
&
sched_params
)
{
app_
=
app
;
Logger
::
udp
().
trace
(
"udp_server::start_receive"
);
thread_
=
std
::
thread
(
&
udp_server
::
udp_read_loop
,
this
,
sched_params
);
Logger
::
udp
().
trace
(
"udp_server::start_receive"
);
thread_
=
std
::
thread
(
&
udp_server
::
udp_read_loop
,
this
,
sched_params
);
thread_
.
detach
();
}
src/udp/udp.hpp
View file @
238c743b
...
...
@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
file
*
except in compliance with the License.
*
You may obtain a copy of the
License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*
file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
...
...
@@ -47,120 +47,133 @@
#include <utility>
#include <vector>
class
udp_application
{
public:
virtual
void
handle_receive
(
char
*
recv_buffer
,
const
std
::
size_t
bytes_transferred
,
const
endpoint
&
r_endpoint
);
virtual
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
class
udp_application
{
public:
virtual
void
handle_receive
(
char
*
recv_buffer
,
const
std
::
size_t
bytes_transferred
,
const
endpoint
&
r_endpoint
);
virtual
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
};
class
udp_server
{
public:
class
udp_server
{
public:
udp_server
(
const
struct
in_addr
&
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
:
app_
(
nullptr
),
port_
(
port_num
)
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
sa_family
=
AF_INET
;
}
else
{
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
500
));
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
}
}
//------------------------------------------------------------------------------
udp_server
(
const
struct
in6_addr
&
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
:
app_
(
nullptr
),
port_
(
port_num
)
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
sa_family
=
AF_INET6
;
}
else
{
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
500
));
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
}
}
//------------------------------------------------------------------------------
udp_server
(
const
char
*
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
udp_server
(
const
char
*
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
}
else
{
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
Logger
::
udp
().
error
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
500
));
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
throw
std
::
system_error
(
socket_
,
std
::
generic_category
(),
"GTPV1-U socket creation failed!"
);
}
}
~
udp_server
()
{
close
(
socket_
);
}
~
udp_server
()
{
close
(
socket_
);
}
void
udp_read_loop
(
const
util
::
thread_sched_params
&
thread_sched_params
);
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
endpoint
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
r_endpoint
.
addr_storage_len
);
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
endpoint
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
r_endpoint
.
addr_storage_len
);
if
(
bytes_written
!=
num_bytes
)
{
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
}
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in
));
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in
));
if
(
bytes_written
!=
num_bytes
)
{
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
}
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in6
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in6
));
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in6
&
r_endpoint
)
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in6
));
if
(
bytes_written
!=
num_bytes
)
{
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
Logger
::
udp
().
error
(
"sendto failed(%d:%s)
\n
"
,
errno
,
strerror
(
errno
));
}
}
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
protected:
int
create_socket
(
const
struct
in_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
);
protected:
int
create_socket
(
const
struct
in_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
);
static
void
handle_send
(
const
char
*
,
/*buffer*/
const
int
&
/*error*/
,
std
::
size_t
/*bytes_transferred*/
)
{
}
static
void
handle_send
(
const
char
*
,
/*buffer*/
const
int
&
/*error*/
,
std
::
size_t
/*bytes_transferred*/
)
{}
udp_application
*
app_
;
std
::
thread
thread_
;
int
socket_
;
uint16_t
port_
;
sa_family_t
sa_family
;
udp_application
*
app_
;
std
::
thread
thread_
;
int
socket_
;
uint16_t
port_
;
sa_family_t
sa_family
;
#define UDP_RECV_BUFFER_SIZE 8192
char
recv_buffer_
[
UDP_RECV_BUFFER_SIZE
];
char
recv_buffer_
[
UDP_RECV_BUFFER_SIZE
];
};
#endif
/* FILE_UDP_HPP_SEEN */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment