<wx/socket.h>
-\wxheading{wxSocket errors}%\label{wxsocketerrs} % Labels don't work on a non-section!
+\wxheading{wxSocket errors}
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
% ---------------------------------------------------------------------------
\wxheading{See also}
-\helpref{wxSocketEvent}{wxsocketevent}\\
-\helpref{wxSocketClient}{wxsocketclient}\\
+\helpref{wxSocketEvent}{wxsocketevent},
+\helpref{wxSocketClient}{wxsocketclient},
\helpref{wxSocketServer}{wxsocketserver}
% ---------------------------------------------------------------------------
\func{}{wxSocketBase}{\void}
-Default constructor. Don't use it; use \helpref{wxSocketClient}{wxsocketclient}
+Default constructor. Don't use it; use \helpref{wxSocketClient}{wxsocketclient}
or \helpref{wxSocketServer}{wxsocketserver}.
\membersection{wxSocketBase::\destruct{wxSocketBase}}
\twocolitem{{\bf wxSOCKET\_NONE}}{Normal functionnality.}
\twocolitem{{\bf wxSOCKET\_NOWAIT}}{Get the available data in the input queue and return immediately.}
\twocolitem{{\bf wxSOCKET\_WAITALL}}{Wait for all required data unless an error occurs.}
-\twocolitem{{\bf wxSOCKET\_BLOCK}}{Block the GUI (do not wxYield) while reading / writing data.}
+\twocolitem{{\bf wxSOCKET\_BLOCK}}{Block the GUI (do not wxYield) while reading/writing data.}
\end{twocollist}
A brief overview on how to use these flags follows.
So:
{\bf wxSOCKET\_NONE} will try to read SOME data, no matter how much.
+
{\bf wxSOCKET\_NOWAIT} will always return immediately, even if it cannot
read or write ANY data.
+
{\bf wxSOCKET\_WAITALL} will only return when it has read or written ALL
the data.
+
{\bf wxSOCKET\_BLOCK} has nothing to do with the previous flags and
it control whether the GUI blocks.
\end{twocollist}%
For example:
+
\begin{verbatim}
sock.SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
\end{verbatim}
+
In this example, the user will be notified about incoming socket data and
whenever the connection is closed.
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastError}{wxsocketbaselasterror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}
%
\wxheading{Remark/Warning}
The exact behaviour of wxSocketBase::Read() depends on the combination
-of flags being used. For a detailed explanation, see \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}
+of flags being used. For a detailed explanation, see \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}.
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastError}{wxsocketbaselasterror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}
%
\wxheading{Remark/Warning}
The exact behaviour of wxSocketBase::Write() depends on the combination
-of flags being used. For a detailed explanation, see \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}
+of flags being used. For a detailed explanation, see \helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}.
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastError}{wxsocketbaselasterror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}
%
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
-\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastError}{wxsocketbaselasterror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
+\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags},
\helpref{wxSocketBase::ReadMsg}{wxsocketbasereadmsg}
%
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
-\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastError}{wxsocketbaselasterror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
+\helpref{wxSocketBase::SetFlags}{wxsocketbasesetflags},
\helpref{wxSocketBase::WriteMsg}{wxsocketbasewritemsg}
%
\wxheading{See also}
-\helpref{wxSocketBase::Error}{wxsocketbaseerror}\\
-\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount}\\
+\helpref{wxSocketBase::Error}{wxsocketbaseerror},
+\helpref{wxSocketBase::LastCount}{wxsocketbaselastcount},
\helpref{wxSocketBase::LastError}{wxsocketbaselasterror}
%
\func{wxSocketBase\&}{Discard}{\void}
This function simply deletes all bytes in the incoming queue. This function
-doesn't wait. That is, it will behave as if the wxSOCKET_NOWAIT flag was set. The
-wxSOCKET_SPEED and wxSOCKET_WAITALL flags have no effect on this function.
+doesn't wait. That is, it will behave as if the wxSOCKET\_NOWAIT flag was set. The
+wxSOCKET\_SPEED and wxSOCKET\_WAITALL flags have no effect on this function.
Use LastCount to see the number of bytes discarded.
\wxheading{See also}
-\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread}\\
-\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite}\\
+\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread},
+\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite},
\helpref{wxSocketBase::WaitForLost}{wxsocketbasewaitforlost}
%
\wxheading{See also}
-\helpref{wxSocketBase::Wait}{wxsocketbasewait}\\
-\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite}\\
+\helpref{wxSocketBase::Wait}{wxsocketbasewait},
+\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite},
\helpref{wxSocketBase::WaitForLost}{wxsocketbasewaitforlost}
%
\wxheading{See also}
-\helpref{wxSocketBase::Wait}{wxsocketbasewait}\\
-\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread}\\
+\helpref{wxSocketBase::Wait}{wxsocketbasewait},
+\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread},
\helpref{wxSocketBase::WaitForLost}{wxsocketbasewaitforlost}
%
\wxheading{See also}
-\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread}\\
-\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite}\\
+\helpref{wxSocketBase::WaitForRead}{wxsocketbasewaitforread},
+\helpref{wxSocketBase::WaitForWrite}{wxsocketbasewaitforwrite},
\helpref{wxSocketBase::WaitForLost}{wxsocketbasewaitforlost}
% ---------------------------------------------------------------------------
\wxheading{See also}
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
-\helpref{wxSocketBase::Notify}{wxsocketbasenotify}\\
-\helpref{wxSocketEvent}{wxsocketevent}\\
-\helpref{wxEvtHandler}{wxevthandler}\\
-\helpref{wxSocketBase::Callback}{wxsocketbasecallback}\\
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
+\helpref{wxSocketBase::Notify}{wxsocketbasenotify},
+\helpref{wxSocketEvent}{wxsocketevent},
+\helpref{wxEvtHandler}{wxevthandler},
+\helpref{wxSocketBase::Callback}{wxsocketbasecallback},
\helpref{wxSocketBase::CallbackData}{wxsocketbasecallbackdata}
\membersection{wxSocketBase::Callback}\label{wxsocketbasecallback}
The first parameter is a reference to the socket object in which the event
occured. The second parameter tells you which event occured. (See \helpref{wxSocket events}{wxsocketbase}).
-The third parameter is the user data you specified using \helpref{CallbackData}{wxsocketcallbackdata}.
+The third parameter is the user data you specified using \helpref{CallbackData}{wxsocketbasecallbackdata}.
\wxheading{Return value}
\wxheading{See also}
-\helpref{wxSocketBase::CallbackData}{wxsocketbasecallbackdata}\\
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
+\helpref{wxSocketBase::CallbackData}{wxsocketbasecallbackdata},
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
\helpref{wxSocketBase::Notify}{wxsocketbasenotify}
\membersection{wxSocketBase::CallbackData}\label{wxsocketbasecallbackdata}
A pointer to the previous user data.
-\helpref{wxSocketBase::Callback}{wxsocketbasecallback}\\
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
+\helpref{wxSocketBase::Callback}{wxsocketbasecallback},
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
\helpref{wxSocketBase::Notify}{wxsocketbasenotify}
% ---------------------------------------------------------------------------
If {\it wait} is TRUE, Connect will wait until the connection completes and
the socket is ready to send or receive data, or until an event occurs.
+
{\bf Warning !} This will block the GUI.
If {\it wait} is FALSE, Connect will try to establish the connection and
return immediately, without blocking the GUI. When used this way, even if
Connect returns FALSE, the connection request can be completed later.
To detect this, use WaitConnection, or watch "connection" events (for
-succesful establishment) and "lost" events (for connection failure)
-
+succesful establishment) and "lost" events (for connection failure).
\wxheading{Parameters}
\wxheading{See also}
-\helpref{wxSocketClient::WaitOnConnect}{wxsocketclientwaitonconnect}\\
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
+\helpref{wxSocketClient::WaitOnConnect}{wxsocketclientwaitonconnect},
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
\helpref{wxSocketBase::Notify}{wxsocketbasenotify}
%
\wxheading{See also}
-\helpref{wxSocketBase}{wxsocketbase},\rtfsp
-\helpref{wxSocketClient}{wxsocketclient},\rtfsp
+\helpref{wxSocketBase}{wxsocketbase},
+\helpref{wxSocketClient}{wxsocketclient},
\helpref{wxSocketServer}{wxsocketserver}
\latexignore{\rtfignore{\wxheading{Members}}}
%
% Accept
%
-\membersection{wxSocketServer::Accept}
+\membersection{wxSocketServer::Accept}\label{wxsocketserveraccept}
\func{wxSocketBase *}{Accept}{\param{bool}{ wait = TRUE}}
\wxheading{See also}
-\helpref{wxSocketServer::WaitForAccept}{wxsocketbasewaitforaccept}\\
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
-\helpref{wxSocketBase::Notify}{wxsocketbasenotify}\\
+\helpref{wxSocketServer::WaitForAccept}{wxsocketserverwaitforaccept},
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
+\helpref{wxSocketBase::Notify}{wxsocketbasenotify},
\helpref{wxSocketServer::AcceptWith}{wxsocketserveracceptwith}
%
{\it wait} parameter was FALSE and there were no pending
connections.
-\helpref{wxSocketServer::WaitForAccept}{wxsocketbasewaitforaccept}\\
-\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify}\\
-\helpref{wxSocketBase::Notify}{wxsocketbasenotify}\\
-\helpref{wxSocketServer::Accept}{wxsocketserveraccept} for a detailed explanation
-
+\helpref{wxSocketServer::WaitForAccept}{wxsocketserverwaitforaccept},
+\helpref{wxSocketBase::SetNotify}{wxsocketbasesetnotify},
+\helpref{wxSocketBase::Notify}{wxsocketbasenotify},
+\helpref{wxSocketServer::Accept}{wxsocketserveraccept}
%
% WaitForAccept
\wxheading{See also}
-\helpref{wxSocketServer::Accept}{wxsocketserveraccept}\\
+\helpref{wxSocketServer::Accept}{wxsocketserveraccept},
\helpref{wxSocketServer::AcceptWith}{wxsocketserveracceptwith}
-