CInternetServer::Broadcast Method  
 
INT Broadcast(
  LPBYTE lpBuffer,  
  INT cbBuffer  
);

Sends data to all clients that are connected to the server.

Parameters

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 method succeeds, the return value is the number of clients that the data was sent to. If the method fails, the return value is INET_ERROR. To get extended error information, call the GetLastError method.

Remarks

The Broadcast method sends the contents of the buffer to all of the clients that are connected to the server. This method 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.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock12.h
Import Library: cswskv12.lib

See Also