source_server 2.0.5-beta source_server: ^2.0.5-beta copied to clipboard
A dart implementation of Source's Query Protocol and RCON from the developer.valvesoftware.com wiki.
import 'dart:io';
import 'package:source_server/source_server.dart';
Future<void> main() async {
var server = SourceServer(InternetAddress('127.0.0.1'), 27022);
await server.connect();
print(await server.getPlayers()); // You might want to add a timeout here.
server.close();
}