Commit c38a1608 authored by Dominik Charousset's avatar Dominik Charousset

Coding style nitpicks

parent 51fdf9a8
...@@ -62,7 +62,7 @@ class multiplexer { ...@@ -62,7 +62,7 @@ class multiplexer {
* Tries to connect to host `h` on given `port` and returns a * Tries to connect to host `h` on given `port` and returns a
* new scribe managing the connection on success. * new scribe managing the connection on success.
*/ */
virtual connection_handle add_tcp_scribe(broker* ptr, const std::string& h, virtual connection_handle add_tcp_scribe(broker* ptr, const std::string& host,
uint16_t port) = 0; uint16_t port) = 0;
/** /**
...@@ -72,10 +72,10 @@ class multiplexer { ...@@ -72,10 +72,10 @@ class multiplexer {
/** /**
* Tries to create a new TCP doorman running on port `p`, optionally * Tries to create a new TCP doorman running on port `p`, optionally
* accepting only connections from host `h`. * accepting only connections from IP address `in`.
*/ */
virtual accept_handle add_tcp_doorman(broker* ptr, uint16_t p, virtual accept_handle add_tcp_doorman(broker* ptr, uint16_t port,
const char* h = nullptr) = 0; const char* in = nullptr) = 0;
/** /**
* Simple wrapper for runnables * Simple wrapper for runnables
......
...@@ -34,13 +34,14 @@ namespace io { ...@@ -34,13 +34,14 @@ namespace io {
* Publishes `whom` at `port`. The connection is managed by the middleman. * Publishes `whom` at `port`. The connection is managed by the middleman.
* @param whom Actor that should be published at `port`. * @param whom Actor that should be published at `port`.
* @param port Unused TCP port. * @param port Unused TCP port.
* @param addr The IP address to listen to or `INADDR_ANY` if `addr == nullptr`. * @param addr The IP address to listen to or `INADDR_ANY` if `in == nullptr`.
* @throws bind_failure * @throws bind_failure
*/ */
inline void publish(caf::actor whom, uint16_t port, inline void publish(caf::actor whom, uint16_t port, const char* in = nullptr) {
const char* addr = nullptr) { if (!whom) {
if (!whom) return; return;
io::publish_impl(actor_cast<abstract_actor_ptr>(whom), port, addr); }
io::publish_impl(actor_cast<abstract_actor_ptr>(whom), port, in);
} }
/** /**
...@@ -48,9 +49,11 @@ inline void publish(caf::actor whom, uint16_t port, ...@@ -48,9 +49,11 @@ inline void publish(caf::actor whom, uint16_t port,
*/ */
template <class... Rs> template <class... Rs>
void typed_publish(typed_actor<Rs...> whom, uint16_t port, void typed_publish(typed_actor<Rs...> whom, uint16_t port,
const char* addr = nullptr) { const char* in = nullptr) {
if (!whom) return; if (!whom) {
io::publish_impl(actor_cast<abstract_actor_ptr>(whom), port, addr); return;
}
io::publish_impl(actor_cast<abstract_actor_ptr>(whom), port, in);
} }
} // namespace io } // namespace io
......
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