\section{ost::UDPReceive Class Reference} \label{classost_1_1_u_d_p_receive}\index{ost::UDPReceive@{ost::UDPReceive}} Representing half of a two-way UDP connection, the UDP receiver can receive data from another peer host or subnet.Unreliable Datagram Peer Associations. {\tt \#include $<$socket.h$>$} Inheritance diagram for ost::UDPReceive::\begin{figure}[H] \begin{center} \leavevmode \includegraphics[height=4cm]{classost_1_1_u_d_p_receive} \end{center} \end{figure} \subsection*{Public Member Functions} \begin{CompactItemize} \item ssize\_\-t {\bf receive} (void $\ast$buf, size\_\-t len) \begin{CompactList}\small\item\em Receive a data packet from the connected peer host. \item\end{CompactList}\item bool {\bf is\-Input\-Ready} ({\bf timeout\_\-t} timeout=TIMEOUT\_\-INF) \begin{CompactList}\small\item\em See if input queue has data packets available. \item\end{CompactList}\end{CompactItemize} \subsection*{Protected Member Functions} \begin{CompactItemize} \item {\bf UDPReceive} (const {\bf IPV4Address} \&bind, {\bf tpport\_\-t} port) \begin{CompactList}\small\item\em Create a UDP receiver, bind it to a specific interface and port address so that other UDP sockets on remote machines (or the same host) may find and send UDP messages to it, and associate it with a given port on a peer host. \item\end{CompactList}\item {\bf UDPReceive} (const {\bf IPV6Address} \&bind, {\bf tpport\_\-t} port) \item {\bf Error} {\bf connect} (const {\bf IPV4Host} \&host, {\bf tpport\_\-t} port) \begin{CompactList}\small\item\em Associate this socket with a specified peer host. \item\end{CompactList}\item {\bf Error} {\bf connect} (const {\bf IPV6Host} \&host, {\bf tpport\_\-t} port) \item bool {\bf is\-Pending\-Receive} ({\bf timeout\_\-t} timeout) \begin{CompactList}\small\item\em Check for pending data. \item\end{CompactList}\item void {\bf end\-Receiver} (void) \begin{CompactList}\small\item\em End receiver. \item\end{CompactList}\item {\bf SOCKET} {\bf get\-Receiver} (void) const \item {\bf Error} {\bf set\-Routing} (bool enable) \item {\bf Error} {\bf set\-Multicast} (bool enable) \item {\bf Error} {\bf join} (const {\bf IPV4Multicast} \&ia) \item {\bf Error} {\bf join} (const {\bf IPV6Multicast} \&ia) \item {\bf Error} {\bf drop} (const {\bf IPV4Multicast} \&ia) \item {\bf Error} {\bf drop} (const {\bf IPV6Multicast} \&ia) \end{CompactItemize} \subsection{Detailed Description} Representing half of a two-way UDP connection, the UDP receiver can receive data from another peer host or subnet.Unreliable Datagram Peer Associations. This class is used exclusivily to derive the {\bf UDPDuplex}{\rm (p.\,\pageref{classost_1_1_u_d_p_duplex})}. \begin{Desc} \item[Author:]David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc} \subsection{Constructor \& Destructor Documentation} \index{ost::UDPReceive@{ost::UDPReceive}!UDPReceive@{UDPReceive}} \index{UDPReceive@{UDPReceive}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::UDPReceive::UDPReceive (const {\bf IPV4Address} \& {\em bind}, {\bf tpport\_\-t} {\em port})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_u_d_p_receive_8ad0a62539c428dc5674c550338025f5} Create a UDP receiver, bind it to a specific interface and port address so that other UDP sockets on remote machines (or the same host) may find and send UDP messages to it, and associate it with a given port on a peer host. On failure to bind, an exception is thrown. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em bind}]address to bind this socket to. \item[{\em port}]number to bind this socket to. \end{description} \end{Desc} \index{ost::UDPReceive@{ost::UDPReceive}!UDPReceive@{UDPReceive}} \index{UDPReceive@{UDPReceive}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::UDPReceive::UDPReceive (const {\bf IPV6Address} \& {\em bind}, {\bf tpport\_\-t} {\em port})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_u_d_p_receive_4dcbcf664f82a174e242754fa5ec9b8a} \subsection{Member Function Documentation} \index{ost::UDPReceive@{ost::UDPReceive}!connect@{connect}} \index{connect@{connect}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::connect (const {\bf IPV6Host} \& {\em host}, {\bf tpport\_\-t} {\em port})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_u_d_p_receive_0e8c851cbc68729353b76894107091e9} Reimplemented from {\bf ost::UDPSocket} {\rm (p.\,\pageref{classost_1_1_u_d_p_socket_759c8f5c76cacfdeac979a5034d658d7})}. Reimplemented in {\bf ost::UDPDuplex} {\rm (p.\,\pageref{classost_1_1_u_d_p_duplex_60abbfd8ef6eac65c8b9726a1d489440})}.\index{ost::UDPReceive@{ost::UDPReceive}!connect@{connect}} \index{connect@{connect}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::connect (const {\bf IPV4Host} \& {\em host}, {\bf tpport\_\-t} {\em port})\hspace{0.3cm}{\tt [protected]}}\label{classost_1_1_u_d_p_receive_a669c5dcf686c200752d4ca125f9f4a6} Associate this socket with a specified peer host. The port number from the constructor will be used. All UDP packets will be sent received from the specified host. \begin{Desc} \item[Returns:]0 on success, -1 on error. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em host}]host network address to connect socket to. \item[{\em port}]host transport port to connect socket to. \end{description} \end{Desc} Reimplemented from {\bf ost::UDPSocket} {\rm (p.\,\pageref{classost_1_1_u_d_p_socket_519db2909a1c43e791e6620b758d3fdc})}. Reimplemented in {\bf ost::UDPDuplex} {\rm (p.\,\pageref{classost_1_1_u_d_p_duplex_219b6497a5dd25e943639cfc1bbb8f81})}.\index{ost::UDPReceive@{ost::UDPReceive}!drop@{drop}} \index{drop@{drop}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::drop (const {\bf IPV6Multicast} \& {\em ia})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_4fb379f4df763e3726c8097d65d4c584} Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_54bb968bfe110dc65bd5d0fb4a47383d})}.\index{ost::UDPReceive@{ost::UDPReceive}!drop@{drop}} \index{drop@{drop}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::drop (const {\bf IPV4Multicast} \& {\em ia})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_6ec872d42da02ac13e3390f4ec6cb98d} Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_c59c08e11070a1602352da5c54332d9e})}.\index{ost::UDPReceive@{ost::UDPReceive}!endReceiver@{endReceiver}} \index{endReceiver@{endReceiver}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::UDPReceive::end\-Receiver (void)\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_ee5e39bfbba0ba9cbfb616b0df254bcd} End receiver. \index{ost::UDPReceive@{ost::UDPReceive}!getReceiver@{getReceiver}} \index{getReceiver@{getReceiver}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf SOCKET} ost::UDPReceive::get\-Receiver (void) const\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_ab58fbd159ce6d8c3f539038196a0d11} \index{ost::UDPReceive@{ost::UDPReceive}!isInputReady@{isInputReady}} \index{isInputReady@{isInputReady}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::UDPReceive::is\-Input\-Ready ({\bf timeout\_\-t} {\em timeout} = {\tt TIMEOUT\_\-INF})\hspace{0.3cm}{\tt [inline]}}\label{classost_1_1_u_d_p_receive_3a63f4aa241374a3550201eaf92c134a} See if input queue has data packets available. \begin{Desc} \item[Returns:]true if data packets available. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em timeout}]in milliseconds. \end{description} \end{Desc} \index{ost::UDPReceive@{ost::UDPReceive}!isPendingReceive@{isPendingReceive}} \index{isPendingReceive@{isPendingReceive}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::UDPReceive::is\-Pending\-Receive ({\bf timeout\_\-t} {\em timeout})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_f5beaaf3d4941735b8784c1c1bc0ea99} Check for pending data. \begin{Desc} \item[Returns:]true if data is waiting. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em timeout}]in milliseconds. \end{description} \end{Desc} \index{ost::UDPReceive@{ost::UDPReceive}!join@{join}} \index{join@{join}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::join (const {\bf IPV6Multicast} \& {\em ia})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_3d1491c118a0609aa6f67aed9a7a5103} Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_b7d4e7cfd0411833ab0b02db1dbed8d5})}.\index{ost::UDPReceive@{ost::UDPReceive}!join@{join}} \index{join@{join}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::join (const {\bf IPV4Multicast} \& {\em ia})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_29df9040b68e4e6b99a03827d7e112c8} Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_fb0e2d234f461ce45711bff52ffc96ad})}.\index{ost::UDPReceive@{ost::UDPReceive}!receive@{receive}} \index{receive@{receive}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}ssize\_\-t ost::UDPReceive::receive (void $\ast$ {\em buf}, size\_\-t {\em len})\hspace{0.3cm}{\tt [inline]}}\label{classost_1_1_u_d_p_receive_39f5e896422f2f3dda0948f265b8b013} Receive a data packet from the connected peer host. \begin{Desc} \item[Returns:]num of bytes actually received. \end{Desc} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em buf}]address of data receive buffer. \item[{\em len}]size of data receive buffer. \end{description} \end{Desc} \index{ost::UDPReceive@{ost::UDPReceive}!setMulticast@{setMulticast}} \index{setMulticast@{setMulticast}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::set\-Multicast (bool {\em enable})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_a513f9513f012494e0fbd61d84c665f6} Reimplemented from {\bf ost::UDPSocket} {\rm (p.\,\pageref{classost_1_1_u_d_p_socket_ce98f5833ad9834af24e78697699c912})}.\index{ost::UDPReceive@{ost::UDPReceive}!setRouting@{setRouting}} \index{setRouting@{setRouting}!ost::UDPReceive@{ost::UDPReceive}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Error} ost::UDPReceive::set\-Routing (bool {\em enable})\hspace{0.3cm}{\tt [inline, protected]}}\label{classost_1_1_u_d_p_receive_e28ec2a16ac42d1a14f015ca5daa260f} Reimplemented from {\bf ost::Socket} {\rm (p.\,\pageref{classost_1_1_socket_2165fdf85e39e6a8aaff3da889ae7e20})}. The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf socket.h}\end{CompactItemize}