@@ -132,10 +132,10 @@ class WebSocketsServerCore : protected WebSockets {
132132 void handleHBPing (WSclient_t * client); // send ping in specified intervals
133133
134134 /* *
135- * called if a non Websocket connection is coming in.
136- * Note: can be override
137- * @param client WSclient_t * ptr to the client struct
138- */
135+ * called if a non Websocket connection is coming in.
136+ * Note: can be override
137+ * @param client WSclient_t * ptr to the client struct
138+ */
139139 virtual void handleNonWebsocketConnection (WSclient_t * client) {
140140 DEBUG_WEBSOCKETS (" [WS-Server][%d][handleHeader] no Websocket connection close.\n " , client->num );
141141 client->tcp ->write (
@@ -151,10 +151,10 @@ class WebSocketsServerCore : protected WebSockets {
151151 }
152152
153153 /* *
154- * called if a non Authorization connection is coming in.
155- * Note: can be override
156- * @param client WSclient_t * ptr to the client struct
157- */
154+ * called if a non Authorization connection is coming in.
155+ * Note: can be override
156+ * @param client WSclient_t * ptr to the client struct
157+ */
158158 virtual void handleAuthorizationFailed (WSclient_t * client) {
159159 client->tcp ->write (
160160 " HTTP/1.1 401 Unauthorized\r\n "
@@ -170,32 +170,32 @@ class WebSocketsServerCore : protected WebSockets {
170170 }
171171
172172 /* *
173- * called for sending a Event to the app
174- * @param num uint8_t
175- * @param type WStype_t
176- * @param payload uint8_t *
177- * @param length size_t
178- */
173+ * called for sending a Event to the app
174+ * @param num uint8_t
175+ * @param type WStype_t
176+ * @param payload uint8_t *
177+ * @param length size_t
178+ */
179179 virtual void runCbEvent (uint8_t num, WStype_t type, uint8_t * payload, size_t length) {
180180 if (_cbEvent) {
181181 _cbEvent (num, type, payload, length);
182182 }
183183 }
184184
185185 /*
186- * Called at client socket connect handshake negotiation time for each http header that is not
187- * a websocket specific http header (not Connection, Upgrade, Sec-WebSocket-*)
188- * If the custom httpHeaderValidationFunc returns false for any headerName / headerValue passed, the
189- * socket negotiation is considered invalid and the upgrade to websockets request is denied / rejected
190- * This mechanism can be used to enable custom authentication schemes e.g. test the value
191- * of a session cookie to determine if a user is logged on / authenticated
192- */
186+ * Called at client socket connect handshake negotiation time for each http header that is not
187+ * a websocket specific http header (not Connection, Upgrade, Sec-WebSocket-*)
188+ * If the custom httpHeaderValidationFunc returns false for any headerName / headerValue passed, the
189+ * socket negotiation is considered invalid and the upgrade to websockets request is denied / rejected
190+ * This mechanism can be used to enable custom authentication schemes e.g. test the value
191+ * of a session cookie to determine if a user is logged on / authenticated
192+ */
193193 virtual bool execHttpHeaderValidation (String headerName, String headerValue) {
194194 if (_httpHeaderValidationFunc) {
195- // return the value of the custom http header validation function
195+ // return the value of the custom http header validation function
196196 return _httpHeaderValidationFunc (headerName, headerValue);
197197 }
198- // no custom http header validation so just assume all is good
198+ // no custom http header validation so just assume all is good
199199 return true ;
200200 }
201201
@@ -205,14 +205,14 @@ class WebSocketsServerCore : protected WebSockets {
205205
206206 /* *
207207 * drop native tcp connection (client->tcp)
208- */
208+ */
209209 void dropNativeClient (WSclient_t * client);
210210
211211 private:
212212 /*
213- * returns an indicator whether the given named header exists in the configured _mandatoryHttpHeaders collection
214- * @param headerName String ///< the name of the header being checked
215- */
213+ * returns an indicator whether the given named header exists in the configured _mandatoryHttpHeaders collection
214+ * @param headerName String ///< the name of the header being checked
215+ */
216216 bool hasMandatoryHeader (String headerName);
217217};
218218
0 commit comments