slim-bindings 0.6.2__tar.gz → 0.6.3__tar.gz

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.

Potentially problematic release.


This version of slim-bindings might be problematic. Click here for more details.

Files changed (221) hide show
  1. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/PKG-INFO +1 -1
  2. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/src/app.rs +5 -0
  3. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/channel_endpoint.rs +1 -1
  4. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/common.rs +3 -2
  5. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/context.rs +4 -5
  6. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/errors.rs +2 -0
  7. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/multicast.rs +18 -21
  8. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/point_to_point.rs +45 -30
  9. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/session_layer.rs +1 -1
  10. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/transmitter.rs +63 -51
  11. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/pyproject.toml +1 -1
  12. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/uv.lock +1 -1
  13. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/Cargo.lock +0 -0
  14. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/Cargo.toml +0 -0
  15. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/README.md +0 -0
  16. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/CHANGELOG.md +0 -0
  17. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/Cargo.toml +0 -0
  18. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/README.md +0 -0
  19. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/auth_provider.rs +0 -0
  20. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/builder.rs +0 -0
  21. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/errors.rs +0 -0
  22. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/file_watcher.rs +0 -0
  23. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/jwt.rs +0 -0
  24. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/jwt_middleware.rs +0 -0
  25. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/lib.rs +0 -0
  26. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/oidc.rs +0 -0
  27. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/resolver.rs +0 -0
  28. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/shared_secret.rs +0 -0
  29. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/testutils.rs +0 -0
  30. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/auth/src/traits.rs +0 -0
  31. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/CHANGELOG.md +0 -0
  32. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/Cargo.toml +0 -0
  33. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/README.md +0 -0
  34. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/build.rs +0 -0
  35. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/proto/hello.proto +0 -0
  36. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/auth/basic.rs +0 -0
  37. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/auth/jwt.rs +0 -0
  38. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/auth/oidc.rs +0 -0
  39. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/auth/static_jwt.rs +0 -0
  40. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/auth.rs +0 -0
  41. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/component/configuration.rs +0 -0
  42. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/component/id.rs +0 -0
  43. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/component.rs +0 -0
  44. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/client.rs +0 -0
  45. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/compression.rs +0 -0
  46. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/errors.rs +0 -0
  47. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/headers_middleware.rs +0 -0
  48. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/helloworld.rs +0 -0
  49. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/proxy.rs +0 -0
  50. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/schema/client-config.schema.json +0 -0
  51. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/schema/generate_schema.rs +0 -0
  52. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc/server.rs +0 -0
  53. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/grpc.rs +0 -0
  54. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/lib.rs +0 -0
  55. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/metadata.rs +0 -0
  56. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/opaque.rs +0 -0
  57. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/provider/env.rs +0 -0
  58. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/provider/file.rs +0 -0
  59. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/provider/lib.rs +0 -0
  60. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/provider.rs +0 -0
  61. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/testutils/helloworld.rs +0 -0
  62. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/testutils/tower_service.rs +0 -0
  63. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/testutils.rs +0 -0
  64. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/tls/client.rs +0 -0
  65. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/tls/common.rs +0 -0
  66. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/tls/provider.rs +0 -0
  67. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/tls/server.rs +0 -0
  68. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/src/tls.rs +0 -0
  69. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/grpc/ca.crt +0 -0
  70. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/grpc/server.crt +0 -0
  71. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/grpc/server.key +0 -0
  72. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256-public.pem +0 -0
  73. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256-wrong.pem +0 -0
  74. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec256.pem +0 -0
  75. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384-public.pem +0 -0
  76. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384-wrong.pem +0 -0
  77. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/ec384.pem +0 -0
  78. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa-public.pem +0 -0
  79. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa-wrong.pem +0 -0
  80. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/eddsa.pem +0 -0
  81. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa-public.pem +0 -0
  82. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa-wrong.pem +0 -0
  83. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/jwt/rsa.pem +0 -0
  84. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/testfile +0 -0
  85. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-1.crt +0 -0
  86. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-2.crt +0 -0
  87. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/ca-bad.crt +0 -0
  88. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/client-1.crt +0 -0
  89. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/client-1.key +0 -0
  90. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/client-2.crt +0 -0
  91. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/client-2.key +0 -0
  92. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/server-1.crt +0 -0
  93. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/server-1.key +0 -0
  94. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/server-2.crt +0 -0
  95. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/testdata/tls/server-2.key +0 -0
  96. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/tests/e2e.rs +0 -0
  97. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/config/tests/tls.rs +0 -0
  98. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/CHANGELOG.md +0 -0
  99. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/Cargo.toml +0 -0
  100. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/README.md +0 -0
  101. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/build.rs +0 -0
  102. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/proto/v1/controller.proto +0 -0
  103. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/api/gen/controller.proto.v1.rs +0 -0
  104. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/api/proto.rs +0 -0
  105. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/api.rs +0 -0
  106. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/config.rs +0 -0
  107. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/errors.rs +0 -0
  108. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/lib.rs +0 -0
  109. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/controller/src/service.rs +0 -0
  110. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/CHANGELOG.md +0 -0
  111. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/Cargo.toml +0 -0
  112. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/README.md +0 -0
  113. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/benches/pool_benchmark.rs +0 -0
  114. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/build.rs +0 -0
  115. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/proto/v1/data-plane.proto +0 -0
  116. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/api/gen/dataplane.proto.v1.rs +0 -0
  117. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/api/proto.rs +0 -0
  118. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/api.rs +0 -0
  119. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/connection.rs +0 -0
  120. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/errors.rs +0 -0
  121. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/forwarder.rs +0 -0
  122. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/lib.rs +0 -0
  123. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/message_processing.rs +0 -0
  124. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/messages/encoder.rs +0 -0
  125. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/messages/utils.rs +0 -0
  126. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/messages.rs +0 -0
  127. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables/connection_table.rs +0 -0
  128. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables/errors.rs +0 -0
  129. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables/pool.rs +0 -0
  130. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables/remote_subscription_table.rs +0 -0
  131. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables/subscription_table.rs +0 -0
  132. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/src/tables.rs +0 -0
  133. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/datapath/tests/data_path_test.rs +0 -0
  134. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/CHANGELOG.md +0 -0
  135. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/Cargo.toml +0 -0
  136. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/README.md +0 -0
  137. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/src/errors.rs +0 -0
  138. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/src/identity_provider.rs +0 -0
  139. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/src/lib.rs +0 -0
  140. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/mls/src/mls.rs +0 -0
  141. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/CHANGELOG.md +0 -0
  142. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/Cargo.toml +0 -0
  143. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/README.md +0 -0
  144. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/src/errors.rs +0 -0
  145. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/src/lib.rs +0 -0
  146. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/service/src/service.rs +0 -0
  147. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/Cargo.toml +0 -0
  148. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/config.rs +0 -0
  149. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/handle.rs +0 -0
  150. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/interceptor.rs +0 -0
  151. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/interceptor_mls.rs +0 -0
  152. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/lib.rs +0 -0
  153. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/moderator_task.rs +0 -0
  154. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/notification.rs +0 -0
  155. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/producer_buffer.rs +0 -0
  156. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/receiver_buffer.rs +0 -0
  157. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/timer.rs +0 -0
  158. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/session/src/traits.rs +0 -0
  159. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/signal/CHANGELOG.md +0 -0
  160. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/signal/Cargo.toml +0 -0
  161. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/signal/README.md +0 -0
  162. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/signal/src/lib.rs +0 -0
  163. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/tracing/CHANGELOG.md +0 -0
  164. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/tracing/Cargo.toml +0 -0
  165. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/tracing/README.md +0 -0
  166. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/tracing/src/lib.rs +0 -0
  167. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/core/tracing/src/utils.rs +0 -0
  168. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/BUILD.md +0 -0
  169. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/CHANGELOG.md +0 -0
  170. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/Cargo.toml +0 -0
  171. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/README.md +0 -0
  172. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/SESSION.md +0 -0
  173. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/Taskfile.yaml +0 -0
  174. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/build.rs +0 -0
  175. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/CHANGELOG.md +0 -0
  176. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/Dockerfile +0 -0
  177. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/README.md +0 -0
  178. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/Taskfile.yaml +0 -0
  179. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/pyproject.toml +0 -0
  180. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/README_group.md +0 -0
  181. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/README_point_to_point.md +0 -0
  182. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/__init__.py +0 -0
  183. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/common.py +0 -0
  184. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/group.py +0 -0
  185. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/point_to_point.py +0 -0
  186. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/examples/src/slim_bindings_examples/slim.py +0 -0
  187. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/__init__.py +0 -0
  188. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/_slim_bindings.pyi +0 -0
  189. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/errors.py +0 -0
  190. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/session.py +0 -0
  191. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/slim.py +0 -0
  192. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/slim_bindings/version.py +0 -0
  193. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/bin/stub_gen.rs +0 -0
  194. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/build_info.rs +0 -0
  195. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/lib.rs +0 -0
  196. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/pyidentity.rs +0 -0
  197. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/pymessage.rs +0 -0
  198. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/pyservice.rs +0 -0
  199. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/pysession.rs +0 -0
  200. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/src/utils.rs +0 -0
  201. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/common.py +0 -0
  202. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/conftest.py +0 -0
  203. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/test_bindings.py +0 -0
  204. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/test_identity.py +0 -0
  205. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/test_multicast.py +0 -0
  206. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/test_point_to_point.py +0 -0
  207. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/test_session_metadata.py +0 -0
  208. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec256-public.pem +0 -0
  209. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec256.pem +0 -0
  210. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec384-public.pem +0 -0
  211. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/ec384.pem +0 -0
  212. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/eddsa-public.pem +0 -0
  213. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/eddsa.pem +0 -0
  214. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/rsa-public.pem +0 -0
  215. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/python/bindings/tests/testdata/rsa.pem +0 -0
  216. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/__init__.py +0 -0
  217. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/_slim_bindings.pyi +0 -0
  218. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/errors.py +0 -0
  219. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/session.py +0 -0
  220. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/slim.py +0 -0
  221. {slim_bindings-0.6.2 → slim_bindings-0.6.3}/slim_bindings/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: slim-bindings
3
- Version: 0.6.2
3
+ Version: 0.6.3
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Topic :: Software Development :: Libraries
@@ -296,6 +296,11 @@ where
296
296
  .await;
297
297
 
298
298
  if let Err(e) = res {
299
+ // Ignore errors due to subscription not found
300
+ if let SessionError::SubscriptionNotFound(_) = e {
301
+ debug!("session not found, ignoring message");
302
+ continue;
303
+ }
299
304
  error!("error handling message: {}", e);
300
305
  }
301
306
  }
@@ -2230,7 +2230,7 @@ mod tests {
2230
2230
  #[tokio::test]
2231
2231
  #[traced_test]
2232
2232
  async fn test_full_join_and_leave() {
2233
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
2233
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
2234
2234
  let (moderator_tx, mut moderator_rx) = tokio::sync::mpsc::channel(50);
2235
2235
  let (participant_tx, mut participant_rx) = tokio::sync::mpsc::channel(50);
2236
2236
 
@@ -16,9 +16,10 @@ pub const SESSION_RANGE: std::ops::Range<u32> = 0..(u32::MAX - 1000);
16
16
  pub const SESSION_UNSPECIFIED: u32 = u32::MAX;
17
17
 
18
18
  /// Channel used in the path service -> app
19
- pub(crate) type AppChannelSender = tokio::sync::mpsc::Sender<Result<Message, SessionError>>;
19
+ pub(crate) type AppChannelSender =
20
+ tokio::sync::mpsc::UnboundedSender<Result<Message, SessionError>>;
20
21
  /// Channel used in the path app -> service
21
- pub type AppChannelReceiver = tokio::sync::mpsc::Receiver<Result<Message, SessionError>>;
22
+ pub type AppChannelReceiver = tokio::sync::mpsc::UnboundedReceiver<Result<Message, SessionError>>;
22
23
  /// Channel used in the path service -> slim
23
24
  pub type SlimChannelSender = tokio::sync::mpsc::Sender<Result<Message, Status>>;
24
25
 
@@ -174,7 +174,6 @@ mod tests {
174
174
  async move {
175
175
  if let Some(tx) = tx {
176
176
  tx.send(msg)
177
- .await
178
177
  .map_err(|e| crate::SessionError::AppTransmission(e.to_string()))?;
179
178
  }
180
179
  Ok(())
@@ -216,7 +215,7 @@ mod tests {
216
215
  // Verifies that a newly created context can upgrade its Weak reference to a strong Arc
217
216
  // and exposes the expected session identity (id + type).
218
217
  async fn context_new_and_upgrade() {
219
- let (tx_app, rx_app) = mpsc::channel(8);
218
+ let (tx_app, rx_app) = mpsc::unbounded_channel();
220
219
  let session = build_session_with_app_tx(1, tx_app);
221
220
  let ctx = SessionContext::new(session.clone(), rx_app);
222
221
  assert!(ctx.session_arc().is_some());
@@ -228,7 +227,7 @@ mod tests {
228
227
  // Validates spawn_receiver executes the provided closure on a background task and that
229
228
  // the Weak<Session> captured inside can still be upgraded while the original Arc exists.
230
229
  async fn context_spawn_receiver_runs_closure() {
231
- let (tx_app, rx_app) = mpsc::channel(4);
230
+ let (tx_app, rx_app) = mpsc::unbounded_channel();
232
231
  let session = build_session_with_app_tx(3, tx_app);
233
232
  let ctx = SessionContext::new(session.clone(), rx_app);
234
233
  let flag = Arc::new(tokio::sync::Mutex::new(false));
@@ -246,7 +245,7 @@ mod tests {
246
245
  // After spawning the receiver, dropping the last strong Arc should allow the Weak to
247
246
  // observe session deallocation (upgrade returns None).
248
247
  async fn context_spawn_receiver_drops_session() {
249
- let (tx_app, rx_app) = mpsc::channel(4);
248
+ let (tx_app, rx_app) = mpsc::unbounded_channel();
250
249
  let session = build_session_with_app_tx(4, tx_app);
251
250
  let ctx = SessionContext::new(session.clone(), rx_app);
252
251
  let weak = ctx.spawn_receiver(|_rx, s| async move {
@@ -265,7 +264,7 @@ mod tests {
265
264
  // Ensures the spawned receiver task (which only reads from rx) terminates once
266
265
  // the session (and implicitly, in real usage, the channel sender owned by it) is dropped.
267
266
  async fn context_spawn_receiver_task_finishes_on_session_drop() {
268
- let (tx_app, rx_app) = mpsc::channel(4);
267
+ let (tx_app, rx_app) = mpsc::unbounded_channel();
269
268
  let session = build_session_with_app_tx(5, tx_app);
270
269
  let ctx = SessionContext::new(session.clone(), rx_app);
271
270
  let (done_tx, done_rx) = oneshot::channel();
@@ -21,6 +21,8 @@ pub enum SessionError {
21
21
  AppTransmission(String),
22
22
  #[error("error processing message: {0}")]
23
23
  Processing(String),
24
+ #[error("error sending message to session: {0}")]
25
+ QueueFullError(String),
24
26
  #[error("session id already used: {0}")]
25
27
  SessionIdAlreadyUsed(String),
26
28
  #[error("invalid session id: {0}")]
@@ -249,7 +249,7 @@ where
249
249
  storage_path: std::path::PathBuf,
250
250
  tx_session: tokio::sync::mpsc::Sender<Result<SessionLayerMessage, SessionError>>,
251
251
  ) -> Self {
252
- let (tx, rx) = mpsc::channel(128);
252
+ let (tx, rx) = mpsc::channel(256);
253
253
 
254
254
  let common = Common::new(
255
255
  id,
@@ -388,7 +388,8 @@ where
388
388
  }
389
389
  let (msg, direction) = result.unwrap();
390
390
 
391
- tracing::trace!("received message from SLIM {} {}", msg.get_session_message_type().as_str_name(), msg.get_id());
391
+ tracing::trace!("received message {} {}", msg.get_session_message_type().as_str_name(), msg.get_id());
392
+
392
393
 
393
394
  // process the messages for the channel endpoint first
394
395
  match msg.get_session_header().session_message_type() {
@@ -687,11 +688,8 @@ async fn process_message_from_app<T>(
687
688
  "error sending publication packet to slim on session {}",
688
689
  session_id
689
690
  );
690
- tx.send_to_app(Err(SessionError::Processing(
691
- "error sending message to local slim instance".to_string(),
692
- )))
693
- .await
694
- .expect("error notifying app");
691
+
692
+ // no need to notify app here, the session will take care of retransmissions
695
693
  }
696
694
 
697
695
  // set timer for this message
@@ -977,10 +975,9 @@ where
977
975
  message: Message,
978
976
  direction: MessageDirection,
979
977
  ) -> Result<(), SessionError> {
980
- self.tx
981
- .send(Ok((message, direction)))
982
- .await
983
- .map_err(|e| SessionError::Processing(e.to_string()))
978
+ self.tx.try_send(Ok((message, direction))).map_err(|e| {
979
+ SessionError::QueueFullError(format!("session={}, error={}", self.common.id(), e))
980
+ })
984
981
  }
985
982
  }
986
983
 
@@ -1060,7 +1057,7 @@ mod tests {
1060
1057
  #[traced_test]
1061
1058
  async fn test_multicast_create() {
1062
1059
  let (tx_slim, _) = tokio::sync::mpsc::channel(1);
1063
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
1060
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
1064
1061
 
1065
1062
  let tx = SessionTransmitter {
1066
1063
  slim_tx: tx_slim.clone(),
@@ -1132,7 +1129,7 @@ mod tests {
1132
1129
  #[traced_test]
1133
1130
  async fn test_multicast_sender_and_receiver() {
1134
1131
  let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(1);
1135
- let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::channel(1);
1132
+ let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
1136
1133
 
1137
1134
  let tx_sender = SessionTransmitter {
1138
1135
  slim_tx: tx_slim_sender,
@@ -1141,7 +1138,7 @@ mod tests {
1141
1138
  };
1142
1139
 
1143
1140
  let (tx_slim_receiver, _rx_slim_receiver) = tokio::sync::mpsc::channel(1);
1144
- let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::channel(1);
1141
+ let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
1145
1142
 
1146
1143
  let tx_receiver = SessionTransmitter {
1147
1144
  slim_tx: tx_slim_receiver,
@@ -1234,7 +1231,7 @@ mod tests {
1234
1231
  #[traced_test]
1235
1232
  async fn test_multicast_rtx_timeouts() {
1236
1233
  let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
1237
- let (tx_app, mut rx_app) = tokio::sync::mpsc::channel(1);
1234
+ let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
1238
1235
 
1239
1236
  let tx = SessionTransmitter {
1240
1237
  slim_tx: tx_slim,
@@ -1322,7 +1319,7 @@ mod tests {
1322
1319
  #[traced_test]
1323
1320
  async fn test_multicast_rtx_reception() {
1324
1321
  let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(8);
1325
- let (tx_app, _rx_app) = tokio::sync::mpsc::channel(8);
1322
+ let (tx_app, _rx_app) = tokio::sync::mpsc::unbounded_channel();
1326
1323
 
1327
1324
  let tx = SessionTransmitter {
1328
1325
  slim_tx: tx_slim,
@@ -1425,8 +1422,8 @@ mod tests {
1425
1422
  #[tokio::test]
1426
1423
  #[traced_test]
1427
1424
  async fn test_multicast_e2e_with_losses() {
1428
- let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(1);
1429
- let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::channel(1);
1425
+ let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(3);
1426
+ let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
1430
1427
 
1431
1428
  let tx_sender = SessionTransmitter {
1432
1429
  slim_tx: tx_slim_sender,
@@ -1434,8 +1431,8 @@ mod tests {
1434
1431
  interceptors: Arc::new(parking_lot::RwLock::new(vec![])),
1435
1432
  };
1436
1433
 
1437
- let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(1);
1438
- let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::channel(1);
1434
+ let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(3);
1435
+ let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
1439
1436
 
1440
1437
  let tx_receiver = SessionTransmitter {
1441
1438
  slim_tx: tx_slim_receiver,
@@ -1657,7 +1654,7 @@ mod tests {
1657
1654
  #[traced_test]
1658
1655
  async fn test_session_delete() {
1659
1656
  let (tx_slim, _) = tokio::sync::mpsc::channel(1);
1660
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
1657
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
1661
1658
 
1662
1659
  let tx = SessionTransmitter {
1663
1660
  slim_tx: tx_slim,
@@ -209,26 +209,34 @@ where
209
209
  #[async_trait]
210
210
  impl timer::TimerObserver for AckTimerObserver {
211
211
  async fn on_timeout(&self, message_id: u32, timeouts: u32) {
212
- self.tx
212
+ let res = self
213
+ .tx
213
214
  .send(InternalMessage::TimerTimeout {
214
215
  message_id,
215
216
  timeouts,
216
217
  ack: true,
217
218
  })
218
- .await
219
- .expect("failed to send timer timeout");
219
+ .await;
220
+
221
+ if let Err(e) = res {
222
+ error!("AckTimerObserver: failed to send timer timeout: {}", e);
223
+ }
220
224
  }
221
225
 
222
226
  async fn on_failure(&self, message_id: u32, timeouts: u32) {
223
227
  // remove the state for the lost message
224
- self.tx
228
+ let res = self
229
+ .tx
225
230
  .send(InternalMessage::TimerFailure {
226
231
  message_id,
227
232
  timeouts,
228
233
  ack: true,
229
234
  })
230
- .await
231
- .expect("failed to send timer failure");
235
+ .await;
236
+
237
+ if let Err(e) = res {
238
+ error!("AckTimerObserver: failed to send timer failure: {}", e);
239
+ }
232
240
  }
233
241
 
234
242
  async fn on_stop(&self, message_id: u32) {
@@ -239,26 +247,34 @@ impl timer::TimerObserver for AckTimerObserver {
239
247
  #[async_trait]
240
248
  impl timer::TimerObserver for RtxTimerObserver {
241
249
  async fn on_timeout(&self, message_id: u32, timeouts: u32) {
242
- self.tx
250
+ let res = self
251
+ .tx
243
252
  .send(InternalMessage::TimerTimeout {
244
253
  message_id,
245
254
  timeouts,
246
255
  ack: false,
247
256
  })
248
- .await
249
- .expect("failed to send timer timeout");
257
+ .await;
258
+
259
+ if let Err(e) = res {
260
+ error!("RtxTimerObserver: failed to send timer timeout: {}", e);
261
+ }
250
262
  }
251
263
 
252
264
  async fn on_failure(&self, message_id: u32, timeouts: u32) {
253
265
  // remove the state for the lost message
254
- self.tx
266
+ let res = self
267
+ .tx
255
268
  .send(InternalMessage::TimerFailure {
256
269
  message_id,
257
270
  timeouts,
258
271
  ack: false,
259
272
  })
260
- .await
261
- .expect("failed to send timer failure");
273
+ .await;
274
+
275
+ if let Err(e) = res {
276
+ error!("RtxTimerObserver: failed to send timer failure: {}", e);
277
+ }
262
278
  }
263
279
 
264
280
  async fn on_stop(&self, message_id: u32) {
@@ -1085,7 +1101,7 @@ where
1085
1101
  identity_verifier: V,
1086
1102
  storage_path: std::path::PathBuf,
1087
1103
  ) -> Self {
1088
- let (tx, rx) = mpsc::channel(128);
1104
+ let (tx, rx) = mpsc::channel(256);
1089
1105
 
1090
1106
  // Common session stuff
1091
1107
  let common = Common::new(
@@ -1297,8 +1313,7 @@ where
1297
1313
  direction: MessageDirection,
1298
1314
  ) -> Result<(), SessionError> {
1299
1315
  self.tx
1300
- .send(InternalMessage::OnMessage { message, direction })
1301
- .await
1316
+ .try_send(InternalMessage::OnMessage { message, direction })
1302
1317
  .map_err(|e| SessionError::SessionClosed(e.to_string()))
1303
1318
  }
1304
1319
  }
@@ -1319,9 +1334,9 @@ mod tests {
1319
1334
  #[tokio::test]
1320
1335
  async fn test_point_to_point_create() {
1321
1336
  let (tx_slim, _) = tokio::sync::mpsc::channel(1);
1322
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
1337
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
1323
1338
 
1324
- let tx = SessionTransmitter::new(tx_app, tx_slim);
1339
+ let tx = SessionTransmitter::new(tx_slim, tx_app);
1325
1340
 
1326
1341
  let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
1327
1342
 
@@ -1346,9 +1361,9 @@ mod tests {
1346
1361
  #[tokio::test]
1347
1362
  async fn test_point_to_point_create_with_remote_dst() {
1348
1363
  let (tx_slim, _) = tokio::sync::mpsc::channel(1);
1349
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
1364
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
1350
1365
 
1351
- let tx = SessionTransmitter::new(tx_app, tx_slim);
1366
+ let tx = SessionTransmitter::new(tx_slim, tx_app);
1352
1367
 
1353
1368
  let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
1354
1369
  let remote = Name::from_strings(["cisco", "default", "remote"]).with_id(999);
@@ -1371,7 +1386,7 @@ mod tests {
1371
1386
  #[tokio::test]
1372
1387
  async fn test_point_to_point_on_message() {
1373
1388
  let (tx_slim, _rx_slim) = tokio::sync::mpsc::channel(1);
1374
- let (tx_app, mut rx_app) = tokio::sync::mpsc::channel(1);
1389
+ let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
1375
1390
 
1376
1391
  // SessionTransmitter::new expects (slim_tx, app_tx)
1377
1392
  let tx = SessionTransmitter::new(tx_slim, tx_app);
@@ -1418,7 +1433,7 @@ mod tests {
1418
1433
  #[tokio::test]
1419
1434
  async fn test_point_to_point_on_message_with_ack() {
1420
1435
  let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
1421
- let (tx_app, mut rx_app) = tokio::sync::mpsc::channel(1);
1436
+ let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
1422
1437
 
1423
1438
  let tx = SessionTransmitter::new(tx_slim, tx_app);
1424
1439
 
@@ -1479,7 +1494,7 @@ mod tests {
1479
1494
  #[tokio::test]
1480
1495
  async fn test_point_to_point_timers_until_error() {
1481
1496
  let (tx_slim, mut rx_slim) = tokio::sync::mpsc::channel(1);
1482
- let (tx_app, mut rx_app) = tokio::sync::mpsc::channel(1);
1497
+ let (tx_app, mut rx_app) = tokio::sync::mpsc::unbounded_channel();
1483
1498
 
1484
1499
  // SessionTransmitter::new expects (slim_tx, app_tx)
1485
1500
  let tx = SessionTransmitter::new(tx_slim, tx_app);
@@ -1542,12 +1557,12 @@ mod tests {
1542
1557
  #[tokio::test]
1543
1558
  async fn test_point_to_point_timers_and_ack() {
1544
1559
  let (tx_slim_sender, mut rx_slim_sender) = tokio::sync::mpsc::channel(1);
1545
- let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::channel(1);
1560
+ let (tx_app_sender, _rx_app_sender) = tokio::sync::mpsc::unbounded_channel();
1546
1561
 
1547
1562
  let tx_sender = SessionTransmitter::new(tx_slim_sender, tx_app_sender);
1548
1563
 
1549
1564
  let (tx_slim_receiver, mut rx_slim_receiver) = tokio::sync::mpsc::channel(1);
1550
- let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::channel(1);
1565
+ let (tx_app_receiver, mut rx_app_receiver) = tokio::sync::mpsc::unbounded_channel();
1551
1566
 
1552
1567
  let tx_receiver = SessionTransmitter::new(tx_slim_receiver, tx_app_receiver);
1553
1568
 
@@ -1663,9 +1678,9 @@ mod tests {
1663
1678
  #[traced_test]
1664
1679
  async fn test_session_delete() {
1665
1680
  let (tx_slim, _) = tokio::sync::mpsc::channel(1);
1666
- let (tx_app, _) = tokio::sync::mpsc::channel(1);
1681
+ let (tx_app, _) = tokio::sync::mpsc::unbounded_channel();
1667
1682
 
1668
- let tx = SessionTransmitter::new(tx_app, tx_slim);
1683
+ let tx = SessionTransmitter::new(tx_slim, tx_app);
1669
1684
 
1670
1685
  let source = Name::from_strings(["cisco", "default", "local"]).with_id(0);
1671
1686
 
@@ -1686,8 +1701,8 @@ mod tests {
1686
1701
  }
1687
1702
 
1688
1703
  async fn template_test_point_to_point_session(mls_enabled: bool) {
1689
- let (sender_tx_slim, mut sender_rx_slim) = tokio::sync::mpsc::channel(1);
1690
- let (sender_tx_app, _sender_rx_app) = tokio::sync::mpsc::channel(1);
1704
+ let (sender_tx_slim, mut sender_rx_slim) = tokio::sync::mpsc::channel(16);
1705
+ let (sender_tx_app, _sender_rx_app) = tokio::sync::mpsc::unbounded_channel();
1691
1706
 
1692
1707
  let sender_tx = SessionTransmitter {
1693
1708
  slim_tx: sender_tx_slim,
@@ -1695,8 +1710,8 @@ mod tests {
1695
1710
  interceptors: Arc::new(RwLock::new(Vec::new())),
1696
1711
  };
1697
1712
 
1698
- let (receiver_tx_slim, mut receiver_rx_slim) = tokio::sync::mpsc::channel(1);
1699
- let (receiver_tx_app, mut receiver_rx_app) = tokio::sync::mpsc::channel(1);
1713
+ let (receiver_tx_slim, mut receiver_rx_slim) = tokio::sync::mpsc::channel(16);
1714
+ let (receiver_tx_app, mut receiver_rx_app) = tokio::sync::mpsc::unbounded_channel();
1700
1715
 
1701
1716
  let receiver_tx = SessionTransmitter {
1702
1717
  slim_tx: receiver_tx_slim,
@@ -222,7 +222,7 @@ where
222
222
  };
223
223
 
224
224
  // Create a new transmitter with identity interceptors
225
- let (app_tx, app_rx) = tokio::sync::mpsc::channel(128);
225
+ let (app_tx, app_rx) = tokio::sync::mpsc::unbounded_channel();
226
226
  let tx = SessionTransmitter::new(self.tx_slim.clone(), app_tx);
227
227
 
228
228
  let identity_interceptor = Arc::new(IdentityInterceptor::new(
@@ -2,6 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  // Standard library imports
5
+ use std::future::Future;
5
6
  use std::sync::Arc;
6
7
 
7
8
  // Third-party crates
@@ -20,45 +21,13 @@ use crate::{
20
21
  notification::Notification,
21
22
  };
22
23
 
23
- /// Macro to generate the common transmitter method body pattern
24
- macro_rules! transmit_with_interceptors {
25
- (
26
- $self:ident,
27
- $message:ident,
28
- $tx_field:ident,
29
- $interceptor_method:ident,
30
- $error_variant:ident
31
- ) => {{
32
- let tx = $self.$tx_field.clone();
33
-
34
- // Interceptors
35
- let interceptors = match &$message {
36
- Ok(_) => $self.interceptors.read().clone(),
37
- Err(_) => Vec::new(),
38
- };
39
-
40
- async move {
41
- if let Ok(msg) = $message.as_mut() {
42
- // Apply interceptors on the message
43
- for interceptor in interceptors {
44
- interceptor.$interceptor_method(msg).await?;
45
- }
46
- }
47
-
48
- tx.send($message)
49
- .await
50
- .map_err(|e| SessionError::$error_variant(e.to_string()))
51
- }
52
- }};
53
- }
54
-
55
24
  /// Transmitter used to intercept messages sent from sessions and apply interceptors on them
56
25
  #[derive(Clone)]
57
26
  pub struct SessionTransmitter {
58
- /// SLIM tx
27
+ /// SLIM tx (bounded channel)
59
28
  pub(crate) slim_tx: SlimChannelSender,
60
29
 
61
- /// App tx
30
+ /// App tx (unbounded channel)
62
31
  pub(crate) app_tx: AppChannelSender,
63
32
 
64
33
  // Interceptors to be called on message reception/send
@@ -90,28 +59,62 @@ impl Transmitter for SessionTransmitter {
90
59
  &self,
91
60
  mut message: Result<Message, SessionError>,
92
61
  ) -> impl Future<Output = Result<(), SessionError>> + Send + 'static {
93
- transmit_with_interceptors!(self, message, app_tx, on_msg_from_slim, AppTransmission)
62
+ let tx = self.app_tx.clone();
63
+
64
+ // Interceptors only run on successful messages
65
+ let interceptors = match &message {
66
+ Ok(_) => self.interceptors.read().clone(),
67
+ Err(_) => Vec::new(),
68
+ };
69
+
70
+ async move {
71
+ if let Ok(msg) = message.as_mut() {
72
+ for interceptor in interceptors {
73
+ interceptor.on_msg_from_slim(msg).await?;
74
+ }
75
+ }
76
+
77
+ tx.send(message)
78
+ .map_err(|e| SessionError::AppTransmission(e.to_string()))
79
+ }
94
80
  }
95
81
 
96
82
  fn send_to_slim(
97
83
  &self,
98
84
  mut message: Result<Message, Status>,
99
85
  ) -> impl Future<Output = Result<(), SessionError>> + Send + 'static {
100
- transmit_with_interceptors!(self, message, slim_tx, on_msg_from_app, SlimTransmission)
86
+ let tx = self.slim_tx.clone();
87
+
88
+ // Interceptors only run on successful messages
89
+ let interceptors = match &message {
90
+ Ok(_) => self.interceptors.read().clone(),
91
+ Err(_) => Vec::new(),
92
+ };
93
+
94
+ async move {
95
+ if let Ok(msg) = message.as_mut() {
96
+ for interceptor in interceptors {
97
+ interceptor.on_msg_from_app(msg).await?;
98
+ }
99
+ }
100
+
101
+ tx.try_send(message)
102
+ .map_err(|e| SessionError::SlimTransmission(e.to_string()))
103
+ }
101
104
  }
102
105
  }
103
106
 
104
- /// Transmitter used to intercept messages sent from sessions and apply interceptors on them
107
+ /// Transmitter used to intercept messages sent from the application side and apply interceptors
105
108
  #[derive(Clone)]
106
109
  pub struct AppTransmitter<P, V>
107
110
  where
108
111
  P: TokenProvider + Send + Sync + Clone + 'static,
109
112
  V: Verifier + Send + Sync + Clone + 'static,
110
113
  {
111
- /// SLIM tx
114
+ /// SLIM tx (bounded channel)
112
115
  pub slim_tx: SlimChannelSender,
113
116
 
114
- /// App tx
117
+ /// App tx (bounded channel here; notifications)
115
118
  pub app_tx: Sender<Result<Notification<P, V>, SessionError>>,
116
119
 
117
120
  // Interceptors to be called on message reception/send
@@ -143,7 +146,6 @@ where
143
146
  ) -> impl Future<Output = Result<(), SessionError>> + Send + 'static {
144
147
  let tx = self.app_tx.clone();
145
148
 
146
- // Interceptors
147
149
  let interceptors = match &message {
148
150
  Ok(_) => self.interceptors.read().clone(),
149
151
  Err(_) => Vec::new(),
@@ -151,7 +153,6 @@ where
151
153
 
152
154
  async move {
153
155
  if let Ok(msg) = message.as_mut() {
154
- // Apply interceptors on the message
155
156
  for interceptor in interceptors {
156
157
  interceptor.on_msg_from_slim(msg).await?;
157
158
  }
@@ -167,7 +168,24 @@ where
167
168
  &self,
168
169
  mut message: Result<Message, Status>,
169
170
  ) -> impl Future<Output = Result<(), SessionError>> + Send + 'static {
170
- transmit_with_interceptors!(self, message, slim_tx, on_msg_from_app, SlimTransmission)
171
+ let tx = self.slim_tx.clone();
172
+
173
+ // Interceptors only run on successful messages
174
+ let interceptors = match &message {
175
+ Ok(_) => self.interceptors.read().clone(),
176
+ Err(_) => Vec::new(),
177
+ };
178
+
179
+ async move {
180
+ if let Ok(msg) = message.as_mut() {
181
+ for interceptor in interceptors {
182
+ interceptor.on_msg_from_app(msg).await?;
183
+ }
184
+ }
185
+
186
+ tx.try_send(message)
187
+ .map_err(|e| SessionError::SlimTransmission(e.to_string()))
188
+ }
171
189
  }
172
190
  }
173
191
 
@@ -242,41 +260,37 @@ mod tests {
242
260
  fn make_message() -> Message {
243
261
  let source = Name::from_strings(["a", "b", "c"]).with_id(0);
244
262
  let dst = Name::from_strings(["d", "e", "f"]).with_id(0);
245
- // Signature: (&Name, &Name, Option<SlimHeaderFlags>, &str, Vec<u8>)
246
263
  Message::new_publish(&source, &dst, None, "application/octet-stream", Vec::new())
247
264
  }
248
265
 
249
266
  #[tokio::test]
250
267
  async fn session_transmitter_interceptor_application_send_to_slim() {
251
268
  let (slim_tx, mut slim_rx) = mpsc::channel::<Result<Message, Status>>(4);
252
- let (app_tx, mut app_rx) = mpsc::channel::<Result<Message, SessionError>>(4);
269
+ let (app_tx, mut app_rx) = mpsc::unbounded_channel::<Result<Message, SessionError>>();
253
270
  let tx = SessionTransmitter::new(slim_tx, app_tx);
254
271
  let interceptor = Arc::new(RecordingInterceptor::default());
255
272
  tx.add_interceptor(interceptor.clone());
256
273
 
257
- // send_to_slim treats the message as originating from the app -> on_msg_from_app invoked
258
274
  tx.send_to_slim(Ok(make_message())).await.unwrap();
259
275
  let sent = slim_rx.recv().await.unwrap().unwrap();
260
276
  assert_eq!(sent.get_metadata("APP").map(|s| s.as_str()), Some("1"));
261
277
  assert_eq!(*interceptor.app_calls.read(), 1);
262
278
  assert_eq!(*interceptor.slim_calls.read(), 0);
263
279
 
264
- // send_to_app treats the message as coming from slim -> on_msg_from_slim invoked
265
280
  tx.send_to_app(Ok(make_message())).await.unwrap();
266
281
  let app_msg = app_rx.recv().await.unwrap().unwrap();
267
282
  assert_eq!(app_msg.get_metadata("SLIM").map(|s| s.as_str()), Some("1"));
268
- assert_eq!(*interceptor.slim_calls.read(), 1); // first slim direction call
283
+ assert_eq!(*interceptor.slim_calls.read(), 1);
269
284
  }
270
285
 
271
286
  #[tokio::test]
272
287
  async fn session_transmitter_error_bypasses_interceptors() {
273
288
  let (slim_tx, mut slim_rx) = mpsc::channel::<Result<Message, Status>>(1);
274
- let (app_tx, _app_rx) = mpsc::channel::<Result<Message, SessionError>>(1);
289
+ let (app_tx, _app_rx) = mpsc::unbounded_channel::<Result<Message, SessionError>>();
275
290
  let tx = SessionTransmitter::new(slim_tx, app_tx);
276
291
  let interceptor = Arc::new(RecordingInterceptor::default());
277
292
  tx.add_interceptor(interceptor.clone());
278
293
 
279
- // Error result: interceptors should not run, calls remain 0
280
294
  tx.send_to_slim(Err(Status::failed_precondition("err")))
281
295
  .await
282
296
  .unwrap();
@@ -298,7 +312,6 @@ mod tests {
298
312
  let interceptor = Arc::new(RecordingInterceptor::default());
299
313
  tx.add_interceptor(interceptor.clone());
300
314
 
301
- // AppTransmitter::send_to_app uses on_msg_from_slim (message inbound from slim)
302
315
  tx.send_to_app(Ok(make_message())).await.unwrap();
303
316
  if let Ok(Notification::NewMessage(msg)) = app_rx.recv().await.unwrap() {
304
317
  assert_eq!(msg.get_metadata("SLIM").map(|s| s.as_str()), Some("1"));
@@ -308,7 +321,6 @@ mod tests {
308
321
  panic!("expected NewMessage notification");
309
322
  }
310
323
 
311
- // AppTransmitter::send_to_slim uses on_msg_from_app (message outbound to slim)
312
324
  tx.send_to_slim(Ok(make_message())).await.unwrap();
313
325
  let slim_msg = slim_rx.recv().await.unwrap().unwrap();
314
326
  assert_eq!(slim_msg.get_metadata("APP").map(|s| s.as_str()), Some("1"));
@@ -10,7 +10,7 @@ build-backend = "maturin"
10
10
 
11
11
  [project]
12
12
  name = "slim-bindings"
13
- version = "0.6.2"
13
+ version = "0.6.3"
14
14
  description = "SLIM Rust bindings for Python"
15
15
  requires-python = ">=3.9, <4.0"
16
16
  readme = "README.md"
@@ -340,7 +340,7 @@ wheels = [
340
340
 
341
341
  [[package]]
342
342
  name = "slim-bindings"
343
- version = "0.6.1"
343
+ version = "0.6.2"
344
344
  source = { editable = "." }
345
345
 
346
346
  [package.dev-dependencies]