Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsocket/rsocket-dart
Dart implementation of RSocket
https://github.com/rsocket/rsocket-dart
dart rsocket
Last synced: 1 day ago
JSON representation
Dart implementation of RSocket
- Host: GitHub
- URL: https://github.com/rsocket/rsocket-dart
- Owner: rsocket
- License: apache-2.0
- Created: 2020-07-16T05:38:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T11:21:29.000Z (about 1 year ago)
- Last Synced: 2024-05-09T09:55:31.683Z (6 months ago)
- Topics: dart, rsocket
- Language: Dart
- Homepage:
- Size: 90.8 KB
- Stars: 31
- Watchers: 7
- Forks: 25
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
RSocket Dart SDK
================# Examples
### Client
```dart
import 'package:rsocket/rsocket_connector.dart';
import 'package:rsocket/payload.dart';void main() async {
var rsocket = await RSocketConnector.create().connect('tcp://127.0.0.1:42252');
var result = await rsocket.requestResponse(Payload.fromText('text/plain', 'Ping'));
print(result.getDataUtf8());
}
```### Server
```dart
import 'package:rsocket/rsocket_server.dart';
import 'package:rsocket/payload.dart';
import 'package:rsocket/rsocket.dart';void main() async {
const listenUrl = 'tcp://0.0.0.0:42252';
var closeable = await RSocketServer.create(requestResponseAcceptor((payload) {
return Future.value(Payload.fromText('text/plain', 'Pong'));
})).bind(listenUrl);
print('RSocket Server started on ${listenUrl}');
}```
### RSocket Service Proxy & Routing
Please refer https://github.com/rsocket/rsocket-dart/tree/master/lib/route
# RSocket
- Operations
- [x] REQUEST_FNF
- [x] REQUEST_RESPONSE
- [x] REQUEST_STREAM
- [ ] REQUEST_CHANNEL
- [x] METADATA_PUSH
- More Operations
- [x] Error
- [ ] Cancel
- [x] Keepalive
- QoS
- [ ] RequestN
- [ ] Lease
- Transport
- [x] TCP
- [x] Websocket
- High Level APIs
- [x] Client
- [x] Server
- Misc
- [x] RxDart# References
* RSocket: https://rsocket.io
* Dart: https://dart.dev/