croupier 2.0.0+1 croupier: ^2.0.0+1 copied to clipboard
A custom SocketCluster client implementation for Dart and Flutter.
import 'package:croupier/croupier.dart';
void main() async {
// Create the client.
var client = SocketClusterClient(
hostname: 'localhost',
port: 3000,
ackTimeout: 500,
);
// Connect to the server.
await client.connect();
// Use the client; (invokes 'myProcedure' on the server.)
var response = await client.invoke('myProcedure');
print(response);
// Close the client to clean up resources and
// cleanly disconnect from the server.
await client.close();
}