Commit Graph

56 Commits

Author SHA1 Message Date
bdee8b9744 call end for ESP8266_ASYNC TCP Server 2018-06-21 09:30:11 +02:00
bde97179bf fix unused parameter warnings
fix switch warinings

part of #319
2018-05-12 11:39:59 +02:00
a796079b0c fix code style 2018-05-12 11:27:03 +02:00
e8c0d775fb fix #146 HTTP Header handler 2018-05-12 11:22:16 +02:00
4b33575af1 add connectedClients see #242 2018-05-10 20:43:08 +02:00
ea8e81c6ce add close #322 2018-05-10 18:56:31 +02:00
887683fabb Merge branch 'master' into esp32 2018-02-06 20:24:03 +01:00
c5461d5779 memset zero _clients struct for server
fixes #244
2017-10-06 18:30:05 +02:00
fa580a568f Merge pull request #223 from robokoding/master
Add ESP32 support from @robokoding
2017-09-20 18:53:55 +02:00
83a1539e1e fix: ESP32 new client connection 2017-09-03 09:55:15 +02:00
4c1c5378cb esp32 no hasClient function 2017-07-30 01:40:36 +02:00
1d40160d99 added esp32 support 2017-07-30 00:54:17 +02:00
adb52b11e9 handle cases when not all data can be written to TCP stack #187 2017-04-09 17:58:23 +02:00
81e567b248 send 401 header too if auth string is empty #116 2017-03-18 10:35:23 +01:00
26140be6c9 fix #150 typo lenght -> length 2017-03-06 15:09:03 -05:00
34a2d282e4 allow to moves all Header strings to Flash (~300 Byte) #152 2017-02-22 15:30:58 +01:00
e93a323e56 add support for Fragmentation / continuation opcode Receive 2017-02-22 14:29:26 +01:00
60e3d1080e Merge branch 'master' into master 2017-02-07 16:05:20 -05:00
d2719573d4 add function to send WS ping
sendPing();

#130
2016-10-22 19:47:44 +02:00
7810d0d0b3 Make library compatible with Particle devices 2016-10-20 15:46:44 -04:00
joe
7e5c64a573 mandatoryHttpHeaderCount fix 2016-06-09 19:48:38 +01:00
joe
97443ae777 custom http header validation implementation; minor comment fixes 2016-06-08 23:11:21 +01:00
joe
e589b40b25 custom http header validation implementation 2016-06-08 23:04:18 +01:00
48ee5fc6fb Firefox fix
Overlay fix for Firefox and other clients that send additional data in the Connection header e.g. "Connection: Keep-Alive, Upgrade"
2016-06-05 08:27:39 +01:00
c4e5f5c7e7 RFC 6455 4.2.1.4 case sensitivity fix
This is a case sensitivity fix for the Connection header Upgrade value to make this part meet the requirement of IETF websocket RFC 6455 4.2.1.4: "A |Connection| header field that includes the token "Upgrade", treated as an ASCII case-insensitive value."
2016-06-04 21:31:42 +01:00
8988faf5f0 fix #60
os_printf can not handle String direct
2016-03-05 12:13:13 +01:00
450ca76a74 add return value to all send functions 2016-02-20 12:27:19 +01:00
c57a4c19ab add HTTP Basic Authorization to WS Client and Server
see: #55
2016-02-17 17:56:03 +01:00
2d87bfa3d6 less ram usage when using strings 2016-02-06 19:21:24 +01:00
790a922d5a add deprecated warning for loop in async mode
fix sync mode
2016-01-23 18:41:45 +01:00
5c2c257526 fix server disconnect problems 2016-01-23 18:34:30 +01:00
57e30e0634 First steps to do async 2016-01-23 16:27:02 +01:00
ece771a275 add support for setting:
- Access-Control-Allow-Origin (#25)
 - Sec-WebSocket-Protocol ()

add _server->close(); for ESP
2016-01-14 17:28:00 +01:00
83ac64b72b add support for AVR
this need some more testing but basics are done
2015-12-10 11:16:08 +01:00
093797a815 first step for SSL (wss) support 2015-12-10 09:36:18 +01:00
7a22dad9d1 try to improve
see: #23
2015-12-05 11:43:03 +01:00
d5b0364f5c allow override of CB handling
see #14
2015-10-31 11:37:07 +01:00
39f912b982 add possibility to add Header To Payload to save one TCP package
see #12
2015-10-11 10:11:32 +02:00
03185498e8 allow overriding the handling of Non Websocket Connection by extending the class.
see #10
2015-08-08 19:54:36 +02:00
afe1a2b9d3 Handle header name case Insensitive
see RFC2616 and #8
2015-07-26 11:08:02 +02:00
cf3ca5fde2 fix #6
Firefox send more then Upgrade in Connection header
2015-07-15 10:09:07 +02:00
28b7619419 allow any "case" for Upgrade
RFC6455:
An |Upgrade| header field containing the value "websocket", treated as an ASCII case-insensitive value.
2015-06-17 10:39:27 +02:00
988ea5cffe Add case for 'Upgrade: WebSocket' 2015-06-12 23:59:42 -07:00
d5c3e17a25 ifdef some ESP8266 specific stuff
rework readWait
2015-05-24 18:00:35 +02:00
e1e6280e82 first working WebSocketClient
add LGPLv2.1
2015-05-24 15:40:47 +02:00
b5dbeccdf5 first steps to Client 2015-05-23 23:51:32 +02:00
2798232074 add IPAddress remoteIP(uint8_t num)
update example
2015-05-23 09:47:39 +02:00
44c00d2dd9 no need to store the Sec-WebSocket-Accept key if needed can be generated by acceptKey from client Sec-WebSocket-Key 2015-05-23 09:34:09 +02:00
0ca1503e52 add disconnect functions
void disconnect(void);
   void disconnect(uint8_t num);
2015-05-23 09:20:44 +02:00
27a9a22908 create overloaded functions for send and broadcast for easy usage
void sendTXT(uint8_t num, uint8_t * payload, size_t length = 0);
        void sendTXT(uint8_t num, const uint8_t * payload, size_t length = 0);
        void sendTXT(uint8_t num, char * payload, size_t length = 0);
        void sendTXT(uint8_t num, const char * payload, size_t length = 0);
        void sendTXT(uint8_t num, String payload);

        void broadcastTXT(uint8_t * payload, size_t length = 0);
        void broadcastTXT(const uint8_t * payload, size_t length = 0);
        void broadcastTXT(char * payload, size_t length = 0);
        void broadcastTXT(const char * payload, size_t length = 0);
        void broadcastTXT(String payload);

        void sendBIN(uint8_t num, uint8_t * payload, size_t length);
        void sendBIN(uint8_t num, const uint8_t * payload, size_t length);

        void broadcastBIN(uint8_t * payload, size_t length);
        void broadcastBIN(const uint8_t * payload, size_t length);

send URL as payload on WStype_CONNECTED event
move Sec-WebSocket-Accept generation in function
2015-05-23 09:02:59 +02:00