Overview

Namespaces

  • aliuly
    • common
      • selectors
    • loader
  • xPaw

Classes

  • ArmorItems
  • BasicCli
  • BasicHelp
  • BasicPlugin
  • ChatSession
  • Cmd
  • CmdSelector
  • ExpandVars
  • FastTransfer
  • FileUtils
  • FreezeSession
  • GetMotd
  • GetMotdAsyncTask
  • InvisibleSession
  • InvUtils
  • ItemName
  • mc
  • mc2
  • MoneyAPI
  • MPMU
  • Npc
  • PermUtils
  • PluginAsyncTask
  • PluginCallbackTask
  • PMScript
  • QueryAsyncTask
  • Rcon
  • RconTask
  • Session
  • ShieldSession
  • ShoppingCart
  • SignUtils
  • SkinUtils
  • SpySession
  • SubCommandMap
  • TPUtils
  • Overview
  • Namespace
  • Class

Class Rcon

This class implements a basic RCON client.

It is done in a non Object Oriented fashion to make it easy to use with an AsyncTask.

Abstract
Namespace: aliuly\common
Located at aliuly/common/Rcon.php
Methods summary
public static str|array
# connect( str $host, integer $port, str $auth )

Establishes a Rcon session.

Establishes a Rcon session.

Returns an array with [$socket,$id]. In the event of an error returns a string with the error message.

Parameters

$host
  • hostname or ip of remote server
$port
  • port to connect to
$auth
  • secret key

Returns

str|array
public static integer
# writePkt( aliuly\common\Rcon::RCTYPE_COMMAND|aliuly\common\Rcon::RCTYPE_AUTH $type, str $payload, resource $sock, &int & $id )

Parameters

$type
$payload
$sock
$id
id

Returns

integer
public static array|null
# readPkt( resource $sock )

Parameters

$sock

Returns

array|null
public static array|str
# cmd( str $cmd, resource $sock, &int & $id )

Sends a remote command

Sends a remote command

Returns [$results,$type] or a string with the error message

Parameters

$cmd
  • command to execute
$sock
  • connection from connect
$id
  • id counter from connect

Returns

array|str
Constants summary
integer RCTYPE_COMMAND
# 2
integer RCTYPE_AUTH
# 3
API documentation generated by ApiGen