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
c390beaa
Commit
c390beaa
authored
Apr 25, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixing
parent
9e34fdf9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/post_office.cpp
src/post_office.cpp
+3
-0
src/unicast_network.cpp
src/unicast_network.cpp
+5
-0
No files found.
src/post_office.cpp
View file @
c390beaa
...
...
@@ -45,6 +45,7 @@
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp"
#include "cppa/atom.hpp"
...
...
@@ -428,6 +429,8 @@ class po_doorman
}
else
{
int
flags
=
1
;
setsockopt
(
sfd
,
IPPROTO_TCP
,
TCP_NODELAY
,
&
flags
,
sizeof
(
int
));
auto
id
=
i
->
aid
;
std
::
uint32_t
process_id
=
m_pself
->
process_id
();
::
send
(
sfd
,
&
id
,
sizeof
(
std
::
uint32_t
),
0
);
...
...
src/unicast_network.cpp
View file @
c390beaa
...
...
@@ -38,6 +38,7 @@
#include <stdexcept>
#include <fcntl.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp"
#include "cppa/atom.hpp"
...
...
@@ -137,6 +138,8 @@ void publish(actor_ptr& whom, std::uint16_t port)
{
throw
network_error
(
"unable to set socket to nonblock"
);
}
flags
=
1
;
setsockopt
(
sockfd
,
IPPROTO_TCP
,
TCP_NODELAY
,
&
flags
,
sizeof
(
int
));
if
(
bind
(
sockfd
,
(
struct
sockaddr
*
)
&
serv_addr
,
sizeof
(
serv_addr
))
<
0
)
{
throw
bind_failure
(
errno
);
...
...
@@ -182,6 +185,8 @@ actor_ptr remote_actor(const char* host, std::uint16_t port)
}
auto
pinf
=
process_information
::
get
();
std
::
uint32_t
process_id
=
pinf
->
process_id
();
int
flags
=
1
;
setsockopt
(
sockfd
,
IPPROTO_TCP
,
TCP_NODELAY
,
&
flags
,
sizeof
(
int
));
::
send
(
sockfd
,
&
process_id
,
sizeof
(
std
::
uint32_t
),
0
);
::
send
(
sockfd
,
pinf
->
node_id
().
data
(),
pinf
->
node_id
().
size
(),
0
);
std
::
uint32_t
remote_actor_id
;
...
...
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