src/WSserver.cpp
bool WebSocketsServer::broadcastBIN(uint8_t * payload, size_t length, bool headerToPayload) {
    WSclient_t * client;
    bool ret = true;
    for(uint8_t i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
        client = &_clients[i];
        if(clientIsConnected(client)) {
            if(!sendFrame(client, WSop_binary, payload, length, false, true, headerToPayload)) {
                ret = false;
            }
        }
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
        delay(0);
#endif
    }
    return ret;
}
/**
 * send binary data to client all
 * @param payload uint8_t *
 * @param length size_t
 * @param headerToPayload bool  (see sendFrame for more details)
 * @return true if ok
 */
send binary data to client all
@param payload uint8_t
@param length size_t
@param headerToPayload bool
@return true if ok
send binary data to client all @param payload uint8_t @param length size_t @param headerToPayload bool @return true if ok
bool WebSocketsServer::broadcastBIN(uint8_t * payload, size_t length, bool headerToPayload) {
    WSclient_t * client;
    bool ret = true;
    for(uint8_t i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
        client = &_clients[i];
        if(clientIsConnected(client)) {
            if(!sendFrame(client, WSop_binary, payload, length, false, true, headerToPayload)) {
                ret = false;
            }
        }
#if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
        delay(0);
#endif
    }
    return ret;
}
bool WebSocketsServer :: broadcastBIN ( uint8_t * payload , size_t length , bool headerToPayload ) { WSclient_t * client ; bool ret = true ; for ( uint8_t i = 0 ; i < WEBSOCKETS_SERVER_CLIENT_MAX ; i ++ ) { client = & _clients [ i ] ; if ( clientIsConnected ( client ) ) { if ( ! sendFrame ( client , WSop_binary , payload , length , false , true , headerToPayload ) ) { ret = false ; } } #if ( WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266 ) delay ( 0 ) ; #endif } return ret ; }
send binary data to client all
 @param payload uint8_t
 @param length size_t
 @param headerToPayload bool  (see sendFrame for more details)
 @return true if ok
send binary data to client all @param payload uint8_t @param length size_t @param headerToPayload bool ( see sendFrame for more details ) @return true if ok