Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
78dced68
Commit
78dced68
authored
Aug 20, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add requested changes
parent
2a628275
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
libcaf_net/src/multiplexer.cpp
libcaf_net/src/multiplexer.cpp
+1
-1
libcaf_net/test/endpoint_manager.cpp
libcaf_net/test/endpoint_manager.cpp
+3
-5
libcaf_net/test/multiplexer.cpp
libcaf_net/test/multiplexer.cpp
+3
-4
libcaf_net/test/scribe.cpp
libcaf_net/test/scribe.cpp
+1
-2
libcaf_net/test/string_application.cpp
libcaf_net/test/string_application.cpp
+2
-2
No files found.
libcaf_net/src/multiplexer.cpp
View file @
78dced68
...
...
@@ -120,7 +120,7 @@ void multiplexer::update(const socket_manager_ptr& mgr) {
std
::
lock_guard
<
std
::
mutex
>
guard
{
write_lock_
};
if
(
write_handle_
!=
invalid_socket
)
res
=
write
(
write_handle_
,
as_bytes
(
make_span
(
&
value
,
sizeof
(
intptr_t
)
)));
as_bytes
(
make_span
(
&
value
,
1
)));
else
res
=
sec
::
socket_invalid
;
}
...
...
libcaf_net/test/endpoint_manager.cpp
View file @
78dced68
...
...
@@ -83,9 +83,8 @@ public:
template
<
class
Manager
>
error
init
(
Manager
&
manager
)
{
write_buf_
.
insert
(
write_buf_
.
end
(),
reinterpret_cast
<
const
byte
*>
(
hello_test
.
begin
()),
reinterpret_cast
<
const
byte
*>
(
hello_test
.
end
()));
auto
test_bytes
=
as_bytes
(
make_span
(
hello_test
));
write_buf_
.
insert
(
write_buf_
.
end
(),
test_bytes
.
begin
(),
test_bytes
.
end
());
CAF_CHECK
(
manager
.
mask_add
(
operation
::
read_write
));
return
none
;
}
...
...
@@ -167,8 +166,7 @@ CAF_TEST(send and receive) {
mpx
->
handle_updates
();
CAF_CHECK_EQUAL
(
mpx
->
num_socket_managers
(),
2u
);
CAF_CHECK_EQUAL
(
write
(
sockets
.
second
,
as_bytes
(
make_span
(
hello_manager
.
data
(),
hello_manager
.
size
()))),
as_bytes
(
make_span
(
hello_manager
))),
hello_manager
.
size
());
run
();
CAF_CHECK_EQUAL
(
string_view
(
reinterpret_cast
<
char
*>
(
buf
->
data
()),
...
...
libcaf_net/test/multiplexer.cpp
View file @
78dced68
...
...
@@ -87,13 +87,12 @@ public:
}
void
send
(
string_view
x
)
{
wr_buf_
.
insert
(
wr_buf_
.
end
(),
reinterpret_cast
<
const
byte
*>
(
x
.
begin
()),
reinterpret_cast
<
const
byte
*>
(
x
.
end
()
));
auto
x_bytes
=
as_bytes
(
make_span
(
x
));
wr_buf_
.
insert
(
wr_buf_
.
end
(),
x_bytes
.
begin
(),
x_bytes
.
end
(
));
}
std
::
string
receive
()
{
std
::
string
result
(
reinterpret_cast
<
char
*>
(
rd_buf_
.
data
()),
reinterpret_cast
<
char
*>
(
read_position_begin
()));
std
::
string
result
(
reinterpret_cast
<
char
*>
(
rd_buf_
.
data
()),
rd_buf_pos_
);
rd_buf_pos_
=
0
;
return
result
;
}
...
...
libcaf_net/test/scribe.cpp
View file @
78dced68
...
...
@@ -140,8 +140,7 @@ CAF_TEST(receive) {
CAF_CHECK_EQUAL
(
mpx
->
num_socket_managers
(),
2u
);
CAF_MESSAGE
(
"sending data to scribe_policy"
);
CAF_CHECK_EQUAL
(
write
(
sockets
.
second
,
as_bytes
(
make_span
(
hello_manager
.
data
(),
hello_manager
.
size
()))),
as_bytes
(
make_span
(
hello_manager
))),
hello_manager
.
size
());
run
();
CAF_CHECK_EQUAL
(
string_view
(
reinterpret_cast
<
char
*>
(
buf
->
data
()),
...
...
libcaf_net/test/string_application.cpp
View file @
78dced68
...
...
@@ -93,8 +93,8 @@ public:
if
(
!
msg
.
match_elements
<
std
::
string
>
())
CAF_FAIL
(
"unexpected message: "
<<
msg
);
auto
&
str
=
msg
.
get_as
<
std
::
string
>
(
0
);
auto
byte
_ptr
=
reinterpret_cast
<
const
byte
*>
(
str
.
data
(
));
buf_
->
insert
(
buf_
->
end
(),
byte
_ptr
,
byte_ptr
+
str
.
size
());
auto
byte
s
=
as_bytes
(
make_span
(
str
));
buf_
->
insert
(
buf_
->
end
(),
byte
s
.
begin
(),
bytes
.
end
());
}
template
<
class
Parent
>
...
...
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