summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2017-03-06 14:24:39 +0100
committerLinus Färnstrand <linus@mullvad.net>2017-03-06 15:28:53 +0100
commitce573f729ebbf042caa78c807b26e8049b220dbd (patch)
tree1c22154bb50cc1b394f02d16c5ef52e768ffb8cb
parentd085f07e5b2654e160c6c34ddc0f8c0100c7b960 (diff)
downloadmullvadvpn-ce573f729ebbf042caa78c807b26e8049b220dbd.tar.xz
mullvadvpn-ce573f729ebbf042caa78c807b26e8049b220dbd.zip
Update outdated doc comment
-rw-r--r--talpid_ipc/src/zmq_ipc.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/talpid_ipc/src/zmq_ipc.rs b/talpid_ipc/src/zmq_ipc.rs
index aa5fe27dd7..f0111af254 100644
--- a/talpid_ipc/src/zmq_ipc.rs
+++ b/talpid_ipc/src/zmq_ipc.rs
@@ -7,17 +7,14 @@ use serde;
use std::thread;
-/// Starts listening to incoming IPC connections on a random port.
-/// Messages are sent to the `on_message` callback. If anything went wrong
-/// when reading the message, the message will be an `Err`.
-/// NOTE that this does not apply to errors regarding whether the server
-/// could start or not, those are returned directly by this function.
+/// Starts the server end of an IPC channel. The returned `IpcServerId` is the unique identifier
+/// allowing an `IpcClient` to connect to this server instance. Returns an error if unable to set
+/// up the server.
///
-/// This function is non-blocking and thus spawns a thread where it
-/// listens to messages.
+/// Incoming messages are sent as `Ok` results to the `on_message` callback. IO errors will be sent
+/// as `Err` results to the `on_message` callback.
///
-/// The value returned from this function should be used by the clients to
-/// the server.
+/// This function is non-blocking and thus spawns a thread where it listens to messages.
pub fn start_new_server<T, F>(on_message: F) -> Result<IpcServerId>
where T: serde::Deserialize + 'static,
F: FnMut(Result<T>) + Send + 'static