printCommandsHelp static method

void printCommandsHelp()

Prints the list of available REPL commands and their usage.

Implementation

static void printCommandsHelp() {
  print('Available commands:');
  print('  list | ls | l [ports|accepts|all]  '
      'List blocked ports and/or accepted addresses (default: all).');
  print(
      '  block <port>                       Block a TCP port (IPv4 + IPv6).');
  print('  unblock <port>                     '
      'Unblock a TCP port (IPv4 + IPv6).');
  print('  accept <address|.> <port>          '
      'Accept an address on a port. `.` = this client (both IPv4 and IPv6).');
  print('  unaccept <address|.> [port]        '
      'Remove an accepted address (all ports if omitted). `.` = this client.');
  print('  myip | my ip                       '
      'Show this client\'s IP as seen by the server.');
  print('  help | ?                           Show this help.');
  print('  exit                               Disconnect and quit.');
}