The library with which to configure a Web Socket Server on a Mbed. This lib was coded by a day at least one year before when this description is written. It will be updated adopting mbed os 5.
Diff: WS_SERVER.h
- Revision:
- 1:73f2f67d1732
- Parent:
- 0:86a479dd1814
--- a/WS_SERVER.h Thu Dec 08 10:11:25 2016 +0000 +++ b/WS_SERVER.h Sat Mar 03 18:47:34 2018 +0000 @@ -88,18 +88,18 @@ bool m_DiscontiuanceFlag; bool m_EODFlag; const uint32_t m_RxBufferSize; - int8_t* m_RxBuffer; // = new uint8_t(RxBufferSize = 1024); + uint8_t* m_RxBuffer; // = new uint8_t(RxBufferSize = 1024); const uint32_t m_PortNumber; // bits (not bytes) is commented to right - int8_t m_FIN_RSV; //[1bit x4(FIN, RSV1, RSV2, RSV3)] - int8_t m_Opcode; //[4bits] - int8_t m_Mask; //[1bit] - int64_t m_PayloadLen; //=x+y bytes[7 xor 7\16 xor 7\64 bits] - int8_t m_Masking_key[4]; //[0-4 bytes] - int8_t* m_PayloadData; //[x+y bytes] - int32_t m_ExtensionLen; //=x bytes - int32_t m_ApplicationLen; //=y bytes - int32_t m_restAppDataLen; //=m_ApplicationLen - already read data len + uint8_t m_FIN_RSV; //[1bit x4(FIN, RSV1, RSV2, RSV3)] + uint8_t m_Opcode; //[4bits] + uint8_t m_Mask; //[1bit] + uint64_t m_PayloadLen; //=x+y bytes[7 xor 7\16 xor 7\64 bits] + uint8_t m_Masking_key[4]; //[0-4 bytes] + uint8_t* m_PayloadData; //[x+y bytes] + uint32_t m_ExtensionLen; //=x bytes + uint64_t m_ApplicationLen; //=y bytes + uint64_t m_restAppDataLen; //=m_ApplicationLen - already read data len enum OpCode{ cont = 0, txt = 1, bin = 2, close = 8, ping = 9, pong = 10 };