* Sets the custom http header validator function * @param httpHeaderValidationFunc WebSocketServerHttpHeaderValFunc ///< pointer to the custom http header validation function * @param mandatoryHttpHeaders[] const char* ///< the array of named http headers considered to be mandatory / must be present in order for websocket upgrade to succeed * @param mandatoryHttpHeaderCount size_t ///< the n
| 150 | * @param mandatoryHttpHeaderCount size_t ///< the number of items in the mandatoryHttpHeaders array |
| 151 | */ |
| 152 | void WebSocketsServer::onValidateHttpHeader( |
| 153 | WebSocketServerHttpHeaderValFunc validationFunc, |
| 154 | const char* mandatoryHttpHeaders[], |
| 155 | size_t mandatoryHttpHeaderCount) |
| 156 | { |
| 157 | _httpHeaderValidationFunc = validationFunc; |
| 158 | |
| 159 | if (_mandatoryHttpHeaders) |
| 160 | delete[] _mandatoryHttpHeaders; |
| 161 | |
| 162 | _mandatoryHttpHeaderCount = mandatoryHttpHeaderCount; |
| 163 | _mandatoryHttpHeaders = new String[_mandatoryHttpHeaderCount]; |
| 164 | |
| 165 | for (size_t i = 0; i < _mandatoryHttpHeaderCount; i++) { |
| 166 | _mandatoryHttpHeaders[i] = mandatoryHttpHeaders[i]; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /* |
| 171 | * send text data to client |
nothing calls this directly
no outgoing calls
no test coverage detected