cim/cim-client-sdk/cim-flutter-sdk/lib/cim_flutter_sdk.dart
2023-07-04 15:58:32 +08:00

22 lines
764 B
Dart

// You have generated a new plugin project without specifying the `--platforms`
// flag. A plugin project with no platform support was generated. To add a
// platform, run `flutter create -t plugin --platforms <platforms> .` under the
// same directory. You can also find a detailed instruction on how to add
// platforms in the `pubspec.yaml` at
// https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms.
import 'cim_socket.dart';
class CimFlutterSdk {
final CIMSocket cimSocket = CIMSocket();
Future<CIMSocket> connect(String uri, int port, int uid) async {
cimSocket.init(uri, port, uid);
cimSocket.connect();
return cimSocket;
}
Future<void> disconnect() async {
cimSocket.disConnect();
}
}