Commit 3a01cb58 authored by Dominik Charousset's avatar Dominik Charousset

Add `unpublish` function to manual

parent ea22d269
...@@ -16,7 +16,7 @@ The optional \lstinline^addr^ parameter can be used to listen only to the given ...@@ -16,7 +16,7 @@ The optional \lstinline^addr^ parameter can be used to listen only to the given
Otherwise, the actor accepts all incoming connections (\lstinline^INADDR_ANY^). Otherwise, the actor accepts all incoming connections (\lstinline^INADDR_ANY^).
\begin{lstlisting} \begin{lstlisting}
io::publish(self, 4242); publish(self, 4242);
self->become ( self->become (
on(atom("ping"), arg_match) >> [](int i) { on(atom("ping"), arg_match) >> [](int i) {
return make_message(atom("pong"), i); return make_message(atom("pong"), i);
...@@ -24,6 +24,12 @@ self->become ( ...@@ -24,6 +24,12 @@ self->become (
); );
\end{lstlisting} \end{lstlisting}
To close a socket, e.g., to allow other actors to be published at the port, the function \lstinline^unpublish^ can be used:
\begin{lstlisting}
void unpublish(caf::actor whom, uint16_t port)
\end{lstlisting}
\subsection{Connecting to Remote Actors} \subsection{Connecting to Remote Actors}
\begin{lstlisting} \begin{lstlisting}
......
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