| INT WINAPI InetServerBroadcast(
|
| |
SOCKET hServer, |
|
| |
LPBYTE lpBuffer, |
|
| |
INT cbBuffer |
|
| );
|
The InetServerBroadcast function sends data to clients
that are connected to the specified server.
Parameters
- hClient
- 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 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
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cswsock7.h.
Library: Use cswskav7.lib.
See Also
InetClientBroadcast,
InetServerStart, InetWrite, InetWriteLine
|