<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\hypertarget{zeromq_8c}{}\doxysection{zeromq.\+c File Reference}
\label{zeromq_8c}\index{zeromq.c@{zeromq.c}}


I/O Adapter for D-\/\+Bus.  


{\ttfamily \#include $&lt;$kdbassert.\+h$&gt;$}\newline
{\ttfamily \#include $&lt;$kdbhelper.\+h$&gt;$}\newline
{\ttfamily \#include $&lt;$kdbio/adapters/zeromq.\+h$&gt;$}\newline
{\ttfamily \#include $&lt;$kdblogger.\+h$&gt;$}\newline
{\ttfamily \#include $&lt;$stdlib.\+h$&gt;$}\newline
{\ttfamily \#include $&lt;$string.\+h$&gt;$}\newline
Include dependency graph for zeromq.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{zeromq_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$ \mbox{\hyperlink{zeromq_8c_a47913553cb0182ad63c8ffa4d435268b}{elektra\+Io\+Adapter\+Zero\+Mq\+Attach}} (void $\ast$socket, \mbox{\hyperlink{kdbio_8h_aabcd87b8c09d4d4c1033fc1baa417391}{Elektra\+Io\+Interface}} $\ast$io\+Binding, \mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback\+Type}} type, \mbox{\hyperlink{zeromq_8h_aec1d6e3033f821aad9149cacefed72a9}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback}} callback, void $\ast$context)
\begin{DoxyCompactList}\small\item\em Attach to Zero\+Mq socket. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{zeromq_8c_a9ac7e46f922b7650a276534453840cd8}{elektra\+Io\+Adapter\+Zero\+Mq\+Set\+Context}} (\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$handle, void $\ast$context)
\begin{DoxyCompactList}\small\item\em Set the callback context for a Zero\+Mq adapter handle. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{zeromq_8c_a9cbe8a4b16a1f64bff600fb9d2ae3b7e}{elektra\+Io\+Adapter\+Zero\+Mq\+Detach}} (\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Remove Zero\+Mq socket from I/O binding. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
I/O Adapter for D-\/\+Bus. 

\begin{DoxyCopyright}{Copyright}
BSD License (see LICENSE.\+md or \href{https://www.libelektra.org}{\texttt{ https\+://www.\+libelektra.\+org}}) 
\end{DoxyCopyright}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{zeromq_8c_a47913553cb0182ad63c8ffa4d435268b}\label{zeromq_8c_a47913553cb0182ad63c8ffa4d435268b}} 
\index{zeromq.c@{zeromq.c}!elektraIoAdapterZeroMqAttach@{elektraIoAdapterZeroMqAttach}}
\index{elektraIoAdapterZeroMqAttach@{elektraIoAdapterZeroMqAttach}!zeromq.c@{zeromq.c}}
\doxysubsubsection{\texorpdfstring{elektraIoAdapterZeroMqAttach()}{elektraIoAdapterZeroMqAttach()}}
{\footnotesize\ttfamily \mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}}$\ast$ elektra\+Io\+Adapter\+Zero\+Mq\+Attach (\begin{DoxyParamCaption}\item[{void $\ast$}]{socket,  }\item[{\mbox{\hyperlink{kdbio_8h_aabcd87b8c09d4d4c1033fc1baa417391}{Elektra\+Io\+Interface}} $\ast$}]{io\+Binding,  }\item[{\mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback\+Type}}}]{type,  }\item[{\mbox{\hyperlink{zeromq_8h_aec1d6e3033f821aad9149cacefed72a9}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback}}}]{callback,  }\item[{void $\ast$}]{context }\end{DoxyParamCaption})}



Attach to Zero\+Mq socket. 

The callback is called whenever socket is readable or writable (depending on type) and data can be processed. The callback should not do blocking calls (e.\+g. use ZMQ\+\_\+\+DONTWAIT for zmq\+\_\+$\ast$recv()). Since Zero\+Mq guarantees that multipart messages arrive at once, data will be available. New adapter instances are enabled.


\begin{DoxyParams}{Parameters}
{\em socket} &amp; Zero\+Mq socket \\
\hline
{\em io\+Binding} &amp; I/O binding \\
\hline
{\em type} &amp; callback type (\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback\+Type}}) 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em callback} &amp; callback \\
\hline
{\em context} &amp; callback context (gets passed to callback) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
handle to use with elektra\+Io\+Zero\+Mq\+Adapter\+Detach() or NULL on error 
\end{DoxyReturn}
\mbox{\Hypertarget{zeromq_8c_a9cbe8a4b16a1f64bff600fb9d2ae3b7e}\label{zeromq_8c_a9cbe8a4b16a1f64bff600fb9d2ae3b7e}} 
\index{zeromq.c@{zeromq.c}!elektraIoAdapterZeroMqDetach@{elektraIoAdapterZeroMqDetach}}
\index{elektraIoAdapterZeroMqDetach@{elektraIoAdapterZeroMqDetach}!zeromq.c@{zeromq.c}}
\doxysubsubsection{\texorpdfstring{elektraIoAdapterZeroMqDetach()}{elektraIoAdapterZeroMqDetach()}}
{\footnotesize\ttfamily int elektra\+Io\+Adapter\+Zero\+Mq\+Detach (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$}]{handle }\end{DoxyParamCaption})}



Remove Zero\+Mq socket from I/O binding. 

This function frees the passed handle.


\begin{DoxyParams}{Parameters}
{\em handle} &amp; adapter handle \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} &amp; on success \\
\hline
{\em 0} &amp; on error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{zeromq_8c_a9ac7e46f922b7650a276534453840cd8}\label{zeromq_8c_a9ac7e46f922b7650a276534453840cd8}} 
\index{zeromq.c@{zeromq.c}!elektraIoAdapterZeroMqSetContext@{elektraIoAdapterZeroMqSetContext}}
\index{elektraIoAdapterZeroMqSetContext@{elektraIoAdapterZeroMqSetContext}!zeromq.c@{zeromq.c}}
\doxysubsubsection{\texorpdfstring{elektraIoAdapterZeroMqSetContext()}{elektraIoAdapterZeroMqSetContext()}}
{\footnotesize\ttfamily void elektra\+Io\+Adapter\+Zero\+Mq\+Set\+Context (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$}]{handle,  }\item[{void $\ast$}]{context }\end{DoxyParamCaption})}



Set the callback context for a Zero\+Mq adapter handle. 

The previous context is replaced and not freed.


\begin{DoxyParams}{Parameters}
{\em handle} &amp; adapter handle \\
\hline
{\em context} &amp; new callback context \\
\hline
\end{DoxyParams}
</pre></body></html>