Open mysend12 opened 2 years ago
agree with @linux-china
//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');
});*/
}
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.