\hypertarget{zeromq_8h}{}\doxysection{zeromq.\+h File Reference}
\label{zeromq_8h}\index{zeromq.h@{zeromq.h}}


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


{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$zmq.\+h$>$}\newline
{\ttfamily \#include $<$kdbio.\+h$>$}\newline
Include dependency graph for zeromq.\+h\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=340pt]{zeromq_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=142pt]{zeromq_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef void($\ast$ \mbox{\hyperlink{zeromq_8h_aec1d6e3033f821aad9149cacefed72a9}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback}}) (void $\ast$socket, void $\ast$context)
\begin{DoxyCompactList}\small\item\em Callback for Zero\+Mq adapter callbacks. \end{DoxyCompactList}\item 
typedef struct \+\_\+\+Elektra\+Io\+Adapter\+Zero\+Mq\+Handle \mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}}
\begin{DoxyCompactList}\small\item\em D-\/\+Bus Adapter Handle. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback\+Type}} \{ \mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3aae7d0f5c84f314252374f4e8587fcec3}{E\+L\+E\+K\+T\+R\+A\+\_\+\+I\+O\+\_\+\+A\+D\+A\+P\+T\+E\+R\+\_\+\+Z\+E\+R\+O\+M\+Q\+C\+B\+\_\+\+R\+E\+AD}} = 1 $<$$<$ 0, 
\mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3a4f9f71c15a8156d607e50870ea33f8e2}{E\+L\+E\+K\+T\+R\+A\+\_\+\+I\+O\+\_\+\+A\+D\+A\+P\+T\+E\+R\+\_\+\+Z\+E\+R\+O\+M\+Q\+C\+B\+\_\+\+W\+R\+I\+TE}} = 1 $<$$<$ 1
 \}
\begin{DoxyCompactList}\small\item\em callback types ~\newline
 \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}} $\ast$ \mbox{\hyperlink{zeromq_8h_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_8h_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_8h_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}
B\+SD License (see L\+I\+C\+E\+N\+S\+E.\+md or \href{https://www.libelektra.org}{\texttt{ https\+://www.\+libelektra.\+org}}) 
\end{DoxyCopyright}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{zeromq_8h_aec1d6e3033f821aad9149cacefed72a9}\label{zeromq_8h_aec1d6e3033f821aad9149cacefed72a9}} 
\index{zeromq.h@{zeromq.h}!ElektraIoAdapterZeroMqCallback@{ElektraIoAdapterZeroMqCallback}}
\index{ElektraIoAdapterZeroMqCallback@{ElektraIoAdapterZeroMqCallback}!zeromq.h@{zeromq.h}}
\doxysubsubsection{\texorpdfstring{ElektraIoAdapterZeroMqCallback}{ElektraIoAdapterZeroMqCallback}}
{\footnotesize\ttfamily typedef void($\ast$ Elektra\+Io\+Adapter\+Zero\+Mq\+Callback) (void $\ast$socket, void $\ast$context)}



Callback for Zero\+Mq adapter callbacks. 


\begin{DoxyParams}{Parameters}
{\em socket} & zeromq socket \\
\hline
{\em context} & callback context supplied to elektra\+Io\+Zero\+Mq\+Adapter\+Attach() \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}\label{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}} 
\index{zeromq.h@{zeromq.h}!ElektraIoAdapterZeroMqHandle@{ElektraIoAdapterZeroMqHandle}}
\index{ElektraIoAdapterZeroMqHandle@{ElektraIoAdapterZeroMqHandle}!zeromq.h@{zeromq.h}}
\doxysubsubsection{\texorpdfstring{ElektraIoAdapterZeroMqHandle}{ElektraIoAdapterZeroMqHandle}}
{\footnotesize\ttfamily typedef struct \+\_\+\+Elektra\+Io\+Adapter\+Zero\+Mq\+Handle \mbox{\hyperlink{zeromq_8h_ad8d7e4ad8779797ff60289f5d8de0d3a}{Elektra\+Io\+Adapter\+Zero\+Mq\+Handle}}}



D-\/\+Bus Adapter Handle. 

Returned by \mbox{\hyperlink{dbus_8c_a0609e59502cc7169ac0512f780830831}{elektra\+Io\+Adapter\+Dbus\+Attach()}}. 

\doxysubsection{Enumeration Type Documentation}
\mbox{\Hypertarget{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}\label{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}} 
\index{zeromq.h@{zeromq.h}!ElektraIoAdapterZeroMqCallbackType@{ElektraIoAdapterZeroMqCallbackType}}
\index{ElektraIoAdapterZeroMqCallbackType@{ElektraIoAdapterZeroMqCallbackType}!zeromq.h@{zeromq.h}}
\doxysubsubsection{\texorpdfstring{ElektraIoAdapterZeroMqCallbackType}{ElektraIoAdapterZeroMqCallbackType}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3}{Elektra\+Io\+Adapter\+Zero\+Mq\+Callback\+Type}}}



callback types ~\newline
 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_READ@{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_READ}!zeromq.h@{zeromq.h}}\index{zeromq.h@{zeromq.h}!ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_READ@{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_READ}}}\mbox{\Hypertarget{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3aae7d0f5c84f314252374f4e8587fcec3}\label{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3aae7d0f5c84f314252374f4e8587fcec3}} 
E\+L\+E\+K\+T\+R\+A\+\_\+\+I\+O\+\_\+\+A\+D\+A\+P\+T\+E\+R\+\_\+\+Z\+E\+R\+O\+M\+Q\+C\+B\+\_\+\+R\+E\+AD&callback is called when socket is readable \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_WRITE@{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_WRITE}!zeromq.h@{zeromq.h}}\index{zeromq.h@{zeromq.h}!ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_WRITE@{ELEKTRA\_IO\_ADAPTER\_ZEROMQCB\_WRITE}}}\mbox{\Hypertarget{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3a4f9f71c15a8156d607e50870ea33f8e2}\label{zeromq_8h_add4d60a256ca3ee3056fa5366bc197f3a4f9f71c15a8156d607e50870ea33f8e2}} 
E\+L\+E\+K\+T\+R\+A\+\_\+\+I\+O\+\_\+\+A\+D\+A\+P\+T\+E\+R\+\_\+\+Z\+E\+R\+O\+M\+Q\+C\+B\+\_\+\+W\+R\+I\+TE&callback is called when socket is writable \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{zeromq_8h_a47913553cb0182ad63c8ffa4d435268b}\label{zeromq_8h_a47913553cb0182ad63c8ffa4d435268b}} 
\index{zeromq.h@{zeromq.h}!elektraIoAdapterZeroMqAttach@{elektraIoAdapterZeroMqAttach}}
\index{elektraIoAdapterZeroMqAttach@{elektraIoAdapterZeroMqAttach}!zeromq.h@{zeromq.h}}
\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 Z\+M\+Q\+\_\+\+D\+O\+N\+T\+W\+A\+IT 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} & Zero\+Mq socket \\
\hline
{\em io\+Binding} & I/O binding \\
\hline
{\em type} & 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} & callback \\
\hline
{\em context} & callback context (gets passed to callback) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
handle to use with elektra\+Io\+Zero\+Mq\+Adapter\+Detach() or N\+U\+LL on error 
\end{DoxyReturn}
\mbox{\Hypertarget{zeromq_8h_a9cbe8a4b16a1f64bff600fb9d2ae3b7e}\label{zeromq_8h_a9cbe8a4b16a1f64bff600fb9d2ae3b7e}} 
\index{zeromq.h@{zeromq.h}!elektraIoAdapterZeroMqDetach@{elektraIoAdapterZeroMqDetach}}
\index{elektraIoAdapterZeroMqDetach@{elektraIoAdapterZeroMqDetach}!zeromq.h@{zeromq.h}}
\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} & adapter handle \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em 1} & on success \\
\hline
{\em 0} & on error \\
\hline
\end{DoxyRetVals}
\mbox{\Hypertarget{zeromq_8h_a9ac7e46f922b7650a276534453840cd8}\label{zeromq_8h_a9ac7e46f922b7650a276534453840cd8}} 
\index{zeromq.h@{zeromq.h}!elektraIoAdapterZeroMqSetContext@{elektraIoAdapterZeroMqSetContext}}
\index{elektraIoAdapterZeroMqSetContext@{elektraIoAdapterZeroMqSetContext}!zeromq.h@{zeromq.h}}
\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} & adapter handle \\
\hline
{\em context} & new callback context \\
\hline
\end{DoxyParams}
