source_server 3.1.0-dev copy "source_server: ^3.1.0-dev" to clipboard
source_server: ^3.1.0-dev copied to clipboard

outdated

A dart implementation of Source's Query Protocol and RCON from the developer.valvesoftware.com wiki.

example/source_server_example.dart

import 'package:source_server/source_server.dart';

Future<void> main() async {
  final server =
      await SourceServer.connect('127.0.0.1', 27015, password: '1234');

  // You should manually add a timeout to all of this functions such as `server.getInfo().timeout(...)`
  final info = await server.getInfo();
  final players = await server.getPlayers();
  final rules = await server.getRules();
  final status = await server.command('status');

  print(info);
  print(players);
  print(rules);
  print(status);

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

Publisher

verified publisherhexah.net

A dart implementation of Source's Query Protocol and RCON from the developer.valvesoftware.com wiki.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

freezed_annotation

More

Packages that depend on source_server