rsocket / rsocket-dart

Dart implementation of RSocket
Apache License 2.0
31 stars 25 forks source link

Support Flutter please... #22

Open mysend12 opened 2 years ago

mysend12 commented 2 years ago

This library does not support Flutter because it uses mirrors. Please help us use it in Flutter.

Also, update support for the Dart library is very lacking. Since the library version is not specified, the dependent library has been updated, but RSocket does not follow the update, so there is also a version problem.

sdack-cloud commented 1 year ago

agree with @linux-china

amondnet commented 1 year ago
//import 'package:rsocket/shelf.dart' // mirror;
import 'package:rsocket/payload.dart';
import 'package:rsocket/rsocket_connector.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());
  /* rsocket.requestStream(Payload.fromText('Ping', '')).listen((payload) {
    print(payload.getDataUtf8());
  }, onDone: () {
    print('done');
  });*/
}