Commit eadca7a
committed
refactor: lazy WebSocket, sync context creation, unified tokio runtime (4.0.5)
- Lazy WebSocket connection: WS connects on first use instead of at creation.
QuoteContext and TradeContext no longer perform any I/O at construction time.
- Sync context creation: QuoteContext::new / TradeContext::new are now
infallible synchronous functions returning Self directly.
All language bindings updated accordingly:
- C: lb_quote/trade_context_new returns the context pointer directly
- C++: QuoteContext/TradeContext::create returns the object directly
- Java: QuoteContext/TradeContext.create() returns the object directly
- Node.js: QuoteContext/TradeContext.new is now a sync static method
- Python: AsyncQuoteContext/TradeContext.create is now a sync classmethod
- Rust blocking: QuoteContextSync/TradeContextSync::new returns Self directly
- Unified tokio runtime: a single global LazyLock<Runtime> in the longbridge
crate is shared across all bindings; no more per-binding runtimes.
- member_id / quote_level / quote_package_details promoted to async API
methods (were previously sync fields); updated across all bindings.
- Java: fix Javadoc formatting in QuoteContext/TradeContext examples,
add missing content package classes to compile task, use platform-aware
classpath separator in Makefile.toml, add --enable-native-access=ALL-UNNAMED.
- Node.js: update all doc-comment examples to sync QuoteContext/TradeContext.new.
- Bump version to 4.0.5.1 parent f5361b9 commit eadca7a
77 files changed
Lines changed: 1509 additions & 1428 deletions
File tree
- cpp
- include
- src
- test
- c
- csrc/include
- src
- quote_context
- trade_context
- test
- examples
- cpp
- get_quote
- history_candlesticks_by_offset
- submit_order
- subscribe_candlesticks
- subscribe_quote
- today_orders
- c
- account_asset
- get_quote
- submit_order
- subscribe_quote
- today_orders
- java
- account_asset/src/main/java
- history_candlesticks/src/main/java
- submit_order/src/main/java
- subscribe_candlesticks/src/main/java
- subscribe_quote/src/main/java
- today_orders/src/main/java
- nodejs
- python
- rust
- account_asset/src
- submit_order/src
- subscribe_candlesticks/src
- subscribe_quote/src
- today_orders/src
- java
- javasrc/src/main/java/com/longbridge
- quote
- trade
- src
- test
- mcp/src
- nodejs
- src
- quote
- trade
- python
- pysrc/longbridge
- src
- quote
- trade
- rust
- src
- blocking
- quote
- trade
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
7 | 22 | | |
8 | 23 | | |
9 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4261 | 4261 | | |
4262 | 4262 | | |
4263 | 4263 | | |
4264 | | - | |
4265 | | - | |
4266 | | - | |
| 4264 | + | |
4267 | 4265 | | |
4268 | 4266 | | |
4269 | 4267 | | |
| |||
4278 | 4276 | | |
4279 | 4277 | | |
4280 | 4278 | | |
4281 | | - | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
4282 | 4282 | | |
4283 | | - | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
4284 | 4286 | | |
4285 | 4287 | | |
4286 | 4288 | | |
| |||
4704 | 4706 | | |
4705 | 4707 | | |
4706 | 4708 | | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
| 4709 | + | |
4710 | 4710 | | |
4711 | 4711 | | |
4712 | 4712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
6 | 2 | | |
7 | 3 | | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 7 | | |
20 | 8 | | |
21 | 9 | | |
| |||
128 | 116 | | |
129 | 117 | | |
130 | 118 | | |
131 | | - | |
132 | 119 | | |
133 | 120 | | |
134 | 121 | | |
135 | 122 | | |
136 | 123 | | |
137 | 124 | | |
138 | | - | |
| 125 | + | |
139 | 126 | | |
140 | 127 | | |
141 | 128 | | |
| |||
0 commit comments