INT WINAPI InetServerBroadcast( |
|
SOCKET hServer, |
|
|
LPBYTE lpBuffer, |
|
|
INT cbBuffer |
|
); |
The InetServerBroadcast function sends data to clients that
are connected to the specified server.
Parameters
- hServer
- The socket handle.
- lpBuffer
- The pointer to the buffer which contains the data that is to be
sent to the server clients.
- cbBuffer
- The number of bytes to send from the specified buffer.
Return Value
If the function succeeds, the return value is the number of
clients that the data was sent to. If the function fails, the return
value is INET_ERROR. To get extended error information, call
InetGetLastError.
Remarks
The InetServerBroadcast function sends the contents of the
buffer to all of the clients that are connected to the specified
server. This function will block until all clients have been sent a
copy of the data. There is no guarantee in which order the clients
will receive and process the data that has been broadcast.
This function can only be used with a socket handle created
using the InetServerStart function and cannot be used with
sockets created using the InetListen or InetListenEx
functions.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header: Include cswsock10.h
Import Library: cswskv10.lib
See Also
InetClientBroadcast,
InetWrite,
InetWriteLine
|