Remove websocket message macros in debugger (#2262)

JERRY_DEBUGGER_INIT_SEND_MESSAGE
JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE
JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE_FROM_TYPE

JerryScript-DCO-1.0-Signed-off-by: Jimmy Huang jimmy.huang@intel.com
This commit is contained in:
Jimmy Huang
2018-04-03 00:06:20 -07:00
committed by László Langó
parent 708f66ad91
commit a0e315719b
3 changed files with 11 additions and 44 deletions
-23
View File
@@ -37,11 +37,6 @@
*/
#define JERRY_DEBUGGER_MAX_RECEIVE_SIZE (JERRY_DEBUGGER_MAX_BUFFER_SIZE - 6)
/**
* Last fragment of a Websocket package.
*/
#define JERRY_DEBUGGER_WEBSOCKET_FIN_BIT 0x80
/**
* WebSocket opcode types.
*/
@@ -80,24 +75,6 @@ typedef struct
uint32_t uint8_offset; /**< current offset in the client source */
} jerry_debugger_uint8_data_t;
/**
* Initialize the header of an outgoing message.
*/
#define JERRY_DEBUGGER_INIT_SEND_MESSAGE(message_p) \
(message_p)->header.ws_opcode = JERRY_DEBUGGER_WEBSOCKET_FIN_BIT | JERRY_DEBUGGER_WEBSOCKET_BINARY_FRAME
/**
* Set the size of an outgoing message from type.
*/
#define JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE_FROM_TYPE(message_p, type) \
(message_p)->header.size = (uint8_t) (sizeof (type) - sizeof (jerry_debugger_send_header_t))
/**
* Set the size of an outgoing message.
*/
#define JERRY_DEBUGGER_SET_SEND_MESSAGE_SIZE(message_p, byte_size) \
(message_p)->header.size = (uint8_t) (byte_size)
bool jerry_debugger_accept_connection (void);
void jerry_debugger_close_connection (void);