rage-iodine 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/iodine/iodine_connection.c +26 -0
- data/lib/iodine/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 631b44322a680678bf03e03a8a52b5926a4890947b8ce994df658d35076d5cbc
|
4
|
+
data.tar.gz: 1bd25cc3fef7949c0dbafcdf1c1099cd654d2f15d3ba3aa61f7fcfd96cdbd922
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d60eb883de1b8910802143a0c69040b32a1e7b9454c493b3dd76e8fa30415488fce2933633735ae84aa2803ac2aa05337861819f7d6ade82a63a4b57e272815
|
7
|
+
data.tar.gz: 5164ae32d754a6f1b6ceda150d416b0eac152cd3d0c17871232da30e1625c2ab4d85419fa1c673f4f217ca9feabaf8b69a4c007665988c7f3e54e682072903d5
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
6
6
|
|
7
7
|
## Changes:
|
8
8
|
|
9
|
+
#### Change log v.4.2.0 (2025-07-23)
|
10
|
+
|
11
|
+
**Update**: Add `Iodine.subscribed?`.
|
12
|
+
|
9
13
|
#### Change log v.4.1.0 (2025-02-07)
|
10
14
|
|
11
15
|
**Update**: Correctly handle `0` timeouts.
|
@@ -692,6 +692,30 @@ static VALUE iodine_pubsub_unsubscribe(VALUE self, VALUE name) {
|
|
692
692
|
return ret;
|
693
693
|
}
|
694
694
|
|
695
|
+
static VALUE iodine_pubsub_is_subscribed(VALUE self, VALUE name) {
|
696
|
+
// clang-format on
|
697
|
+
iodine_connection_data_s *c = NULL;
|
698
|
+
fio_lock_i *s_lock = &sub_lock;
|
699
|
+
fio_subhash_s *subs = &sub_global;
|
700
|
+
VALUE ret;
|
701
|
+
if (TYPE(self) != T_MODULE) {
|
702
|
+
c = iodine_connection_validate_data(self);
|
703
|
+
if (!c || c->info.uuid == -1) {
|
704
|
+
return Qfalse; /* the connection is closed */
|
705
|
+
}
|
706
|
+
s_lock = &c->lock;
|
707
|
+
subs = &c->subscriptions;
|
708
|
+
}
|
709
|
+
if (TYPE(name) == T_SYMBOL)
|
710
|
+
name = rb_sym2str(name);
|
711
|
+
Check_Type(name, T_STRING);
|
712
|
+
fio_lock(s_lock);
|
713
|
+
ret = iodine_sub_find(subs, IODINE_RSTRINFO(name));
|
714
|
+
fio_unlock(s_lock);
|
715
|
+
|
716
|
+
return ret;
|
717
|
+
}
|
718
|
+
|
695
719
|
// clang-format off
|
696
720
|
/**
|
697
721
|
Publishes a message to a channel.
|
@@ -935,6 +959,8 @@ void iodine_connection_init(void) {
|
|
935
959
|
// define global methods
|
936
960
|
rb_define_module_function(IodineModule, "subscribe", iodine_pubsub_subscribe,
|
937
961
|
-1);
|
962
|
+
rb_define_module_function(IodineModule, "subscribed?",
|
963
|
+
iodine_pubsub_is_subscribed, 1);
|
938
964
|
rb_define_module_function(IodineModule, "unsubscribe",
|
939
965
|
iodine_pubsub_unsubscribe, 1);
|
940
966
|
rb_define_module_function(IodineModule, "publish", iodine_pubsub_publish, -1);
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rage-iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-07-23 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rake
|
@@ -252,7 +251,6 @@ licenses:
|
|
252
251
|
- MIT
|
253
252
|
metadata:
|
254
253
|
allowed_push_host: https://rubygems.org
|
255
|
-
post_install_message:
|
256
254
|
rdoc_options: []
|
257
255
|
require_paths:
|
258
256
|
- lib
|
@@ -274,8 +272,7 @@ requirements:
|
|
274
272
|
- Ruby >= 2.5.0 recommended.
|
275
273
|
- TLS requires OpenSSL >= 1.1.0.
|
276
274
|
- Or Windows with Ruby >= 3.0.0 build with MingW and MingW as compiler.
|
277
|
-
rubygems_version: 3.
|
278
|
-
signing_key:
|
275
|
+
rubygems_version: 3.6.2
|
279
276
|
specification_version: 4
|
280
277
|
summary: iodine - a fast HTTP / Websocket Server with Pub/Sub support, optimized for
|
281
278
|
Ruby MRI on Linux / BSD / Windows
|