Commit c390beaa authored by neverlord's avatar neverlord

bugfixing

parent 9e34fdf9
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp" #include "cppa/cppa.hpp"
#include "cppa/atom.hpp" #include "cppa/atom.hpp"
...@@ -428,6 +429,8 @@ class po_doorman ...@@ -428,6 +429,8 @@ class po_doorman
} }
else else
{ {
int flags = 1;
setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof(int));
auto id = i->aid; auto id = i->aid;
std::uint32_t process_id = m_pself->process_id(); std::uint32_t process_id = m_pself->process_id();
::send(sfd, &id, sizeof(std::uint32_t), 0); ::send(sfd, &id, sizeof(std::uint32_t), 0);
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <stdexcept> #include <stdexcept>
#include <fcntl.h> #include <fcntl.h>
#include <netinet/tcp.h>
#include "cppa/cppa.hpp" #include "cppa/cppa.hpp"
#include "cppa/atom.hpp" #include "cppa/atom.hpp"
...@@ -137,6 +138,8 @@ void publish(actor_ptr& whom, std::uint16_t port) ...@@ -137,6 +138,8 @@ void publish(actor_ptr& whom, std::uint16_t port)
{ {
throw network_error("unable to set socket to nonblock"); 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) if (bind(sockfd, (struct sockaddr*) &serv_addr, sizeof(serv_addr)) < 0)
{ {
throw bind_failure(errno); throw bind_failure(errno);
...@@ -182,6 +185,8 @@ actor_ptr remote_actor(const char* host, std::uint16_t port) ...@@ -182,6 +185,8 @@ actor_ptr remote_actor(const char* host, std::uint16_t port)
} }
auto pinf = process_information::get(); auto pinf = process_information::get();
std::uint32_t process_id = pinf->process_id(); 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, &process_id, sizeof(std::uint32_t), 0);
::send(sockfd, pinf->node_id().data(), pinf->node_id().size(), 0); ::send(sockfd, pinf->node_id().data(), pinf->node_id().size(), 0);
std::uint32_t remote_actor_id; std::uint32_t remote_actor_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment