added support for broadcasting to UDP sockets (patch 1740266)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,6 +98,23 @@ On IPV6 implementations, ::
|
||||
|
||||
Returns true on success, false if something went wrong.
|
||||
|
||||
%
|
||||
% BroadcastAddress
|
||||
%
|
||||
|
||||
\membersection{wxIPaddress::BroadcastAddress}\label{wxIPaddressbroadcastaddress}
|
||||
|
||||
\func{virtual bool}{BroadcastAddress}{\void}
|
||||
|
||||
Internally, this is the same as setting the IP address
|
||||
to {\bf INADDR\_BROADCAST}.
|
||||
|
||||
On IPV4 implementations, 255.255.255.255
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns true on success, false if something went wrong.
|
||||
|
||||
%
|
||||
% LocalHost
|
||||
%
|
||||
|
@@ -524,6 +524,8 @@ The following flags can be used:
|
||||
\twocolitem{{\bf wxSOCKET\_WAITALL}}{Wait for all required data to be read/written unless an error occurs.}
|
||||
\twocolitem{{\bf wxSOCKET\_BLOCK}}{Block the GUI (do not yield) while reading/writing data.}
|
||||
\twocolitem{{\bf wxSOCKET\_REUSEADDR}}{Allows the use of an in-use port (wxServerSocket only)}
|
||||
\twocolitem{{\bf wxSOCKET\_BROADCAST}}{Switches the socket to broadcast mode}
|
||||
\twocolitem{{\bf wxSOCKET\_NOBIND}}{Stops the socket from being bound to a specific adapter (normally used in conjunction with {\bf wxSOCKET\_BROADCAST})}
|
||||
\end{twocollist}
|
||||
|
||||
A brief overview on how to use these flags follows.
|
||||
@@ -568,6 +570,10 @@ your platform's implementation of setsockopt(). Note that on BSD-based systems (
|
||||
use of wxSOCKET\_REUSEADDR implies SO\_REUSEPORT in addition to SO\_REUSEADDR to be consistent
|
||||
with Windows.
|
||||
|
||||
The {\bf wxSOCKET\_BROADCAST} flag controls the use of the SO\_BROADCAST standard
|
||||
setsockopt() flag. This flag allows the socket to use the broadcast address, and is generally
|
||||
used in conjunction with {\bf wxSOCKET\_NOBIND} and \helpref{wxIPaddress::BroadcastAddress}{wxipaddressbroadcastaddress}.
|
||||
|
||||
So:
|
||||
|
||||
{\bf wxSOCKET\_NONE} will try to read at least SOME data, no matter how much.
|
||||
|
Reference in New Issue
Block a user