236 Commits

Author SHA1 Message Date
Ian Reinhart Geiser
973baa3749
build: Support vcpkg - Update cmake for system install (#367)
* Update cmake for system install

* remove tooling hack

* CMake 3.4 is required so this is not needed

Co-authored-by: Joan Marcè i Igual <jmigual@users.noreply.github.com>

* Use submodules on ci

* Update .github/workflows/ci.yml

* Update CMakeLists.txt

Co-authored-by: Joan Marcè i Igual <jmigual@users.noreply.github.com>
2022-08-01 11:37:06 +02:00
Abraham Hernandez
9bca702b92
build: removing .DS_Store (#362) 2022-04-26 10:18:53 +02:00
Patti Vacek
bacd9172e7
core: abort retrying when closing down. (#312)
Signed-off-by: Patti Vacek <pattivacek@gmail.com>
2022-03-29 10:00:34 +02:00
Tor Morten Finnesand
5a0c1ececd
core: re-enable ping timeout behaviour for 3x branch (#351)
Heartbeat mechanism was not properly working as intended. 

For more info see: https://socket.io/docs/v4/how-it-works/#disconnection-detection
2022-03-09 16:02:20 +01:00
jianjunz
c733c3e165
docs: remove Cocoapods from iOS installation guide. (#78)
As mentioned in #67, Cocoapods is not supported at this time.
2022-03-09 15:00:29 +01:00
dependabot[bot]
7496162fa3
deps: bump ws from 7.4.2 to 7.4.6 in /test/echo_server (#308)
Bumps [ws](https://github.com/websockets/ws) from 7.4.2 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.2...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-09 09:38:48 +01:00
Joan Marcè i Igual
9ad238358b
chore: set default build type as Release 2022-03-08 12:12:46 +01:00
Federico Fuga
9173946c96
chore: Remove unnecessary check for CMAKE_BUILD_TYPE (#311) 2022-03-08 12:01:15 +01:00
Joan Marcè i Igual
e2ca1f1e16
Merge pull request #319 from Desp4/master
Make non-cmake installation instructions mimic cmake
2022-02-25 09:15:36 +01:00
Joan Marcè i Igual
c7e4103dc2
Merge branch 'master' into master 2022-02-25 09:13:57 +01:00
Joan Marcè i Igual
d823428541
Merge pull request #334 from Jikari/patch-1
Exposing include files for use in projects via FetchContent
2022-02-25 08:37:27 +01:00
Gabriel Jablonski
46597e393d
docs: add vcpkg installation instructions (#252) 2022-01-10 09:15:55 +01:00
Gabriel Jablonski
23f243ff55
feat: send auth object upon connecting (#335)
Usage:

```c++
sio::client client;

sio::message::ptr auth = sio::object_message::create();
auth->get_map()["token"] = sio::string_message::create("eyJhbGciOiJIUzI1NiIsInR...");
auth->get_map()["sessionId"] = sio::string_message::create("p0ZoB1FwH6");

client.connect(server_url, auth);
```
2021-11-23 23:44:34 +01:00
Joan Marcè i Igual
2b1dda79cf
chore: increase minimum CMake version (#328)
Reference: https://hsf-training.github.io/hsf-training-cmake-webpage/07-commonproblems/index.html
2021-11-23 23:31:12 +01:00
Berrae Meixsell
94a59f0224
Update CMakeLists.txt
Exposing include files for use in projects via FetchContent
2021-11-12 09:03:24 -06:00
Damien Arrachequesne
2573a120d9
docs: add changelog for version 2.1.0 2021-10-12 11:12:29 +02:00
Damien Arrachequesne
aba189cad8
chore(release): 3.1.0 3.1.0 2021-10-12 10:24:29 +02:00
Chris Grahn
82d39a90ef
feat: support TLSv1.2 and newer (#321) 2021-09-02 08:40:06 +02:00
Desp4
3ff5fc8347
update non-cmake installation guide 2021-08-01 02:41:05 +03:00
Johny Qiu
e8ea70776d
feat: use TLSv2 when TLS is used (#310) 2021-06-11 11:15:24 +02:00
Damien Arrachequesne
0581aaba02
docs: update compatibility table for Socket.IO v4
The v4 contains only a few breaking changes at the API level on the
server-side, so the current C++ client is compatible.

Reference: https://socket.io/docs/v4/migrating-from-3-x-to-4-0/
2021-03-24 23:01:55 +01:00
Edwin Shepherd
e7f17c6c26
docs: fix title format (#297) 2021-03-24 22:40:14 +01:00
Joel Nordell
36a8cd4527
feat: allow resource path to be set in connection URI (#134)
Please note that this implementation differs from the JS one, where the
resource path is the namespace you want to reach:

```js
const socket = io("https://example.com/my-namespace", {
  path: "/my-custom-path/"
});
```

Here, we will have:

```C++
sio::client h;
h.connect("https://example.com/my-custom-path/");
h.socket("/my-namespace")->emit("hello");
```
2021-02-14 07:01:35 +01:00
Adrian DC
e7de4ebf64 fix: resolve client_impl::ping LOG call syntax in debug builds 2021-02-09 00:04:31 +01:00
Adrian DC
d1c73b73a8 fix: resolve #254: handle closing sockets upon on_fail events 2021-02-09 00:04:31 +01:00
DK Moon
b196fa7537 fix: lower the minimum CMake supported version
If CMake doesn't understand C++11-related property,
simply use the COMPILE_FLAGS property
2021-01-15 23:29:54 +01:00
Adrian DC
1b42ce738f feat: implement #45: add support for logging configuration 2021-01-15 23:29:54 +01:00
Damien Arrachequesne
ec4d540ad5
feat: add support for Socket.IO v3
See also:

- https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4
- https://github.com/socketio/socket.io-protocol#difference-between-v5-and-v4
3.0.0
2021-01-09 02:28:05 +01:00
Damien Arrachequesne
b1216ee428
refactor: use correct Engine.IO protocol revision
The 3rd revision is included in Socket.IO v1/v2, whereas the 4th is
included in Socket.IO v3.

Note: this query parameter is not currently checked on the server-side

Reference: https://github.com/socketio/engine.io-protocol
2.0.0
2021-01-09 02:13:39 +01:00
Vincent Raman
d353647b39
refactor: use standard install paths (#58) 2021-01-07 16:27:15 +01:00
Damien Arrachequesne
8d4fe204f1
ci: migrate to GitHub Actions
Due to the recent changes to the Travis CI platform (see [1]), we will
now use GitHub Actions to run the tests.

Reference: https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-nodejs

[1]: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
2021-01-07 16:04:48 +01:00
Damien Arrachequesne
019742fcd5
chore: update .gitignore with cmake output
[skip ci]
2021-01-07 14:55:00 +01:00
Sepehr Laal
af68bf3067
refactor: remove Boost dependency (#176)
- add the standalone ASIO as a replacement for Boost ASIO
- add Catch++ as a replacement for Boost Test framework
- remove dependency on Boost DateTime and Boost Lexical Cast
2021-01-07 14:27:25 +01:00
melode11
6063cb1d61 Merge pull request #138 from jianjunz/querystring
URL encode query string.
2017-10-13 17:43:11 -07:00
melode11
08e83ea0ed Merge pull request #145 from limitedAtonement/master
Remove unused parameters and reorder constructors to get rid of warnings
2017-10-13 17:42:54 -07:00
melode11
d38c233657 Merge pull request #149 from evileye2000/master
Remove unused argument
2017-10-13 17:40:56 -07:00
melode11
ff3297ba0d Merge pull request #135 from ErisExchange/eris-more_reliable_close
Consider all client-initiated closes to be close_reason_normal.
2017-10-13 17:38:27 -07:00
Jack Lee
d8f8ed516b Remove unused argument 2017-03-06 19:21:56 +09:00
melode11
4d83a7a404 Merge pull request #125 from botlink/master
Change client_impl::send_impl() not to delay ping
2017-02-23 18:06:11 -08:00
lmat
aee175e81c Remove unused parameters and reorder constructors to get rid of warnings 2017-02-13 12:39:46 -05:00
Jianjun Zhu
ffff9412e7 URL encode query string.
Percent encode query string so it can handle non-ascii characters and
reserved characters.
2017-01-03 09:47:22 +08:00
Joel Nordell
29468bfbd2 Consider all client-initiated closes to be close_reason_normal.
If any errors occur while closing, such as TLS Short Read, we don't want
to reconnect if we had initiated the close.
2016-12-08 10:05:02 -06:00
Chris Grahn
7a6770e909 Change client_impl::send_impl() not to delay ping
client_impl::close_impl() only gets called when the user is closing the
connection ("End by user"), when there is a handshake error, when the
server sends a frame_close packet ("End by server"), or when there is a
pong timeout.

Before, in the case where send_impl() would continously get called with
an interval less than client_impl::m_ping_interval, a disconnect due to
network problems would never be detected because the ping would keep
getting delayed, thus never allowing the pong timeout to happen. This
fixes that by not delaying pings.
2016-11-16 14:46:04 -06:00
melode11
725a8e0e17 Merge pull request #104 from a-tatarsky/master
client: support custom HTTP headers
2016-09-18 10:26:01 +08:00
melode11
52e99b7533 Merge pull request #107 from Magic07/ipv6
Support IPv6 literal address.
2016-09-18 10:24:13 +08:00
melode11
f62e777aa4 Merge pull request #110 from laneysmith/patch-1
Update API.md
2016-09-18 10:22:15 +08:00
melode11
d0a846e026 Merge pull request #116 from mehanig/fix-readme-missing-brackets-typo
Missing brackets in Readme File?
2016-09-18 10:21:16 +08:00
Mike
6181d577ff Missing brackets in socket constructor 2016-09-15 15:39:03 +03:00
Laney Smith
74c61eacea Update API.md
formatting, spelling :)
2016-08-13 11:34:10 -06:00
Jianjun Zhu
e666fa0c5e Support IPv6 literal address. 2016-08-04 15:53:58 +08:00