Björn Ritzl
cba11de5f1
Run DNS lookup in a separate thread ( #37 )
...
* Moved connection pool dial to a thread
* Make sure to join the thread when done
* Cleanup in AppInitialize. Early exit if pool creation failed.
* Only check connection timeout for emscripten
2021-03-17 12:59:01 +01:00
Björn Ritzl
4e67c4dfaa
Add the port to the url for html5 builds ( #35 )
...
Fixes #34
2021-03-10 11:56:26 +01:00
Björn Ritzl
efe9115413
Use the Emscripten websocket library instead of POSIX socket emulation ( #33 )
...
* Switched to direct javascript websockets
* Skip the null termination on text messages when pushing
* Moved Emscripten callbacks and some other PR improvements
* STATE_CONNECT -> STATE_CREATE
* Changed disconnect logic
* Review feedback
2021-02-18 22:13:53 +01:00
Alexander Palagin
b3afb9a276
close socket when destroying websocket connection instead of returning it back to connection pool ( #32 )
2021-02-10 08:49:23 +01:00
Alexander Palagin
7346f142fa
replace dmStriCmp with dmStrCaseCmp ( #31 )
2021-02-10 07:50:09 +01:00
JCash
bd4e5c0b35
Compiler warning fixes
2021-02-04 08:49:00 +01:00
Alexander Palagin
ac230a6278
Handshake response object if handshake failed ( #29 )
...
* added handshake response object, so if error occurs on websocket handhsake stage, server's response can be reachable for further decisions
* fixed typo; removed c++11 style constructors
2021-02-04 08:30:40 +01:00
Alexander Palagin
39abd7cdea
always call lua callback when connection goes to STATE_DISCONNECTED ( #28 )
2021-01-25 11:59:17 +01:00
Björn Ritzl
7e89b8a685
Destroy connections when finalizing the extension
2020-12-22 12:19:12 +01:00
JCash
b93a91c9b8
Issue 22: Don't send Sec-WebSocket-Protocol unless specified
2020-11-09 19:03:27 +01:00
Mathias Westerdahl
8a9dc759a4
Merge pull request #21 from defold/issue-18-error-message-fix
...
Issue 18: Documentation fix
2020-10-31 15:48:47 +01:00
Mathias Westerdahl
70afde4cfa
Merge pull request #20 from defold/issue-17-path-fix
...
Issue 17: Fixed path argument in http handshake
2020-10-31 15:48:21 +01:00
JCash
2c9c0b74f1
Issue 18: Documentation fix
2020-10-31 10:55:36 +01:00
JCash
8450a88640
Issue 17: Fixed path argument in http handshake
2020-10-31 10:40:21 +01:00
JCash
3636ea73db
added documentation
2020-10-31 10:18:50 +01:00
JCash
1cc1d802b3
Issue 16: Added protocol as a connection parameter
2020-10-31 10:14:44 +01:00
JCash
94bcc82f25
cleanup
2020-10-18 09:42:53 +02:00
JCash
d62a53cbcc
Doc fix
2020-10-18 09:42:40 +02:00
JCash
78d527d3a8
Issue 5: Added support for custom headers
2020-10-17 12:26:20 +02:00
JCash
b54e3e07ad
review fix
2020-10-17 11:47:23 +02:00
JCash
e105702c79
Issue 13: Added support for connect sequence timeout
...
Decreased the select timeout when reading headers
Don't call callback with DISCONNECTED if the connection was never connected
2020-10-17 11:40:53 +02:00
JCash
9d1ace0a82
Issue 11: Added support for both binary and text frames
2020-10-17 10:28:19 +02:00
JCash
ba2b8e4a69
Updated hex string logging to use our internal logging functions
...
This will keep the output in-order
2020-10-13 09:33:38 +02:00
JCash
176f213060
updated documentation
2020-10-13 09:14:21 +02:00
JCash
5b0a9960a8
Check the response headers more thoroughly
2020-10-12 09:45:05 +02:00
JCash
40ba1b334c
Issue 4: Compare header keys without case sensitivity
2020-10-12 09:33:47 +02:00
JCash
36bf5d1c03
code cleanup
2020-09-27 17:04:00 +02:00
JCash
274f29d7e4
moved error checking code outside of socket implementation
2020-09-27 17:02:14 +02:00
JCash
bd8569f49a
Issue 8: Handle the websocket close event
2020-09-27 16:54:22 +02:00
JCash
8e32fa3c76
compile fixes
2020-09-26 15:50:24 +02:00
JCash
832a156395
Issue 6: Handle multiple messages per frame
2020-09-26 12:51:43 +02:00
JCash
8df9eed682
Removed redundant / in concatenated uri's
2020-09-06 09:35:09 +02:00
JCash
071adac853
Added separate code path for html5
2020-09-05 11:02:59 +02:00
Björn Ritzl
1202731ec8
Added api docs for websocket.send()
2020-09-04 11:22:54 +02:00
JCash
bd9e777b99
Windows compile fixes
2020-09-03 17:28:10 +02:00
JCash
26a9ef0143
Code cleanup
2020-09-02 16:54:37 +02:00
JCash
5de32250c3
Websocket now supports html5 as well
2020-09-02 10:44:02 +02:00
JCash
1e6c534609
Added support for SSL
2020-08-28 12:43:50 +02:00
JCash
0e589290ed
some restructuring of the code
2020-08-25 16:50:33 +02:00
JCash
e781c84283
first embryo
2020-08-25 14:25:29 +02:00