Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
cpp-libs
Actor Framework
Commits
fe3bca30
Commit
fe3bca30
authored
Aug 28, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ip_endpoint forward-declaration
parent
e96daa80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+1
-0
libcaf_io/src/udp.cpp
libcaf_io/src/udp.cpp
+7
-8
No files found.
libcaf_core/caf/fwd.hpp
View file @
fe3bca30
...
@@ -185,6 +185,7 @@ enum class stream_priority;
...
@@ -185,6 +185,7 @@ enum class stream_priority;
using
actor_id
=
uint64_t
;
using
actor_id
=
uint64_t
;
using
binary_serializer
=
serializer_impl
<
std
::
vector
<
char
>>
;
using
binary_serializer
=
serializer_impl
<
std
::
vector
<
char
>>
;
using
ip_address
=
ipv6_address
;
using
ip_address
=
ipv6_address
;
using
ip_endpoint
=
ipv6_endpoint
;
using
ip_subnet
=
ipv6_subnet
;
using
ip_subnet
=
ipv6_subnet
;
using
settings
=
dictionary
<
config_value
>
;
using
settings
=
dictionary
<
config_value
>
;
using
stream_slot
=
uint16_t
;
using
stream_slot
=
uint16_t
;
...
...
libcaf_io/src/udp.cpp
View file @
fe3bca30
...
@@ -22,25 +22,24 @@
...
@@ -22,25 +22,24 @@
#include "caf/logger.hpp"
#include "caf/logger.hpp"
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
# include <winsock2.h>
#
include <winsock2.h>
#else
#else
#
include <sys/types
.h>
#
include <sys/socket
.h>
#
include <sys/socket
.h>
#
include <sys/types
.h>
#endif
#endif
using
caf
::
io
::
network
::
is_error
;
using
caf
::
io
::
network
::
is_error
;
using
caf
::
io
::
network
::
ip_endpoint
;
using
caf
::
io
::
network
::
last_socket_error
;
using
caf
::
io
::
network
::
native_socket
;
using
caf
::
io
::
network
::
native_socket
;
using
caf
::
io
::
network
::
signed_size_type
;
using
caf
::
io
::
network
::
signed_size_type
;
using
caf
::
io
::
network
::
socket_size_type
;
using
caf
::
io
::
network
::
last_socket_error
;
using
caf
::
io
::
network
::
socket_error_as_string
;
using
caf
::
io
::
network
::
socket_error_as_string
;
using
caf
::
io
::
network
::
socket_size_type
;
namespace
caf
{
namespace
caf
{
namespace
policy
{
namespace
policy
{
bool
udp
::
read_datagram
(
size_t
&
result
,
native_socket
fd
,
void
*
buf
,
bool
udp
::
read_datagram
(
size_t
&
result
,
native_socket
fd
,
void
*
buf
,
size_t
buf_len
,
ip_endpoint
&
ep
)
{
size_t
buf_len
,
i
o
::
network
::
i
p_endpoint
&
ep
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
fd
));
CAF_LOG_TRACE
(
CAF_ARG
(
fd
));
memset
(
ep
.
address
(),
0
,
sizeof
(
sockaddr_storage
));
memset
(
ep
.
address
(),
0
,
sizeof
(
sockaddr_storage
));
socket_size_type
len
=
sizeof
(
sockaddr_storage
);
socket_size_type
len
=
sizeof
(
sockaddr_storage
);
...
@@ -64,7 +63,7 @@ bool udp::read_datagram(size_t& result, native_socket fd, void* buf,
...
@@ -64,7 +63,7 @@ bool udp::read_datagram(size_t& result, native_socket fd, void* buf,
}
}
bool
udp
::
write_datagram
(
size_t
&
result
,
native_socket
fd
,
void
*
buf
,
bool
udp
::
write_datagram
(
size_t
&
result
,
native_socket
fd
,
void
*
buf
,
size_t
buf_len
,
const
ip_endpoint
&
ep
)
{
size_t
buf_len
,
const
i
o
::
network
::
i
p_endpoint
&
ep
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
fd
)
<<
CAF_ARG
(
buf_len
));
CAF_LOG_TRACE
(
CAF_ARG
(
fd
)
<<
CAF_ARG
(
buf_len
));
socket_size_type
len
=
static_cast
<
socket_size_type
>
(
*
ep
.
clength
());
socket_size_type
len
=
static_cast
<
socket_size_type
>
(
*
ep
.
clength
());
auto
sres
=
::
sendto
(
fd
,
reinterpret_cast
<
io
::
network
::
socket_send_ptr
>
(
buf
),
auto
sres
=
::
sendto
(
fd
,
reinterpret_cast
<
io
::
network
::
socket_send_ptr
>
(
buf
),
...
...
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