Update WebSockets.cpp

Added some missing comments
This commit is contained in:
PeterEmbedded
2017-10-16 13:01:00 +02:00
committed by GitHub
parent c5461d5779
commit a0c714bf10

View File

@ -51,8 +51,8 @@ extern "C" {
* *
* @param client WSclient_t * ptr to the client struct * @param client WSclient_t * ptr to the client struct
* @param code uint16_t see RFC * @param code uint16_t see RFC
* @param reason * @param reason ptr to the disconnect reason message
* @param reasonLen * @param reasonLen length of the disconnect reason message
*/ */
void WebSockets::clientDisconnect(WSclient_t * client, uint16_t code, char * reason, size_t reasonLen) { void WebSockets::clientDisconnect(WSclient_t * client, uint16_t code, char * reason, size_t reasonLen) {
DEBUG_WEBSOCKETS("[WS][%d][handleWebsocket] clientDisconnect code: %u\n", client->num, code); DEBUG_WEBSOCKETS("[WS][%d][handleWebsocket] clientDisconnect code: %u\n", client->num, code);
@ -73,8 +73,8 @@ void WebSockets::clientDisconnect(WSclient_t * client, uint16_t code, char * rea
* *
* @param client WSclient_t * ptr to the client struct * @param client WSclient_t * ptr to the client struct
* @param opcode WSopcode_t * @param opcode WSopcode_t
* @param payload uint8_t * * @param payload uint8_t * ptr to the payload
* @param length size_t * @param length size_t length of the payload
* @param mask bool add dummy mask to the frame (needed for web browser) * @param mask bool add dummy mask to the frame (needed for web browser)
* @param fin bool can be used to send data in more then one frame (set fin on the last frame) * @param fin bool can be used to send data in more then one frame (set fin on the last frame)
* @param headerToPayload bool set true if the payload has reserved 14 Byte at the beginning to dynamically add the Header (payload neet to be in RAM!) * @param headerToPayload bool set true if the payload has reserved 14 Byte at the beginning to dynamically add the Header (payload neet to be in RAM!)
@ -92,7 +92,7 @@ bool WebSockets::sendFrame(WSclient_t * client, WSopcode_t opcode, uint8_t * pay
return false; return false;
} }
DEBUG_WEBSOCKETS("[WS][%d][sendFrame] ------- send massage frame -------\n", client->num); DEBUG_WEBSOCKETS("[WS][%d][sendFrame] ------- send message frame -------\n", client->num);
DEBUG_WEBSOCKETS("[WS][%d][sendFrame] fin: %u opCode: %u mask: %u length: %u headerToPayload: %u\n", client->num, fin, opcode, mask, length, headerToPayload); DEBUG_WEBSOCKETS("[WS][%d][sendFrame] fin: %u opCode: %u mask: %u length: %u headerToPayload: %u\n", client->num, fin, opcode, mask, length, headerToPayload);
if(opcode == WSop_text) { if(opcode == WSop_text) {