resp_client 0.1.0 copy "resp_client: ^0.1.0" to clipboard
resp_client: ^0.1.0 copied to clipboard

outdated

A RESP (REdis Serialization Protocol) client for Dart.

example/example.dart

import 'package:resp_client/resp_client.dart';
import 'package:resp_client/resp_commands.dart';

void main(List<String> args) async {
  // create a RESP server connection using sockets
  final RespServerConnection server = await connectSocket('localhost');

  // create a RESP client using the server connection
  RespClient client = RespClient(server);

  // create RESP commands using the client
  RespCommands commands = RespCommands(client);

  final clientList = await commands.clientList();
  print(clientList);

  final set = await commands.set('test', 'foobar', expire: Duration(seconds: 10));
  print(set);

  final exists = await commands.exists(['test']);
  print(exists);

  final ttl = await commands.ttl('test');
  print(ttl);

  final get = await commands.get('test');
  print(get);

  final del = await commands.del(['test']);
  print(del);

  server.close();
}
6
likes
0
pub points
80%
popularity

Publisher

verified publisherblimster.net

A RESP (REdis Serialization Protocol) client for Dart.

Homepage

License

unknown (LICENSE)

Dependencies

rxdart

More

Packages that depend on resp_client