Valve RCON Class
Synopsis:
General Usage:
Traditional Lazy Usage:
Note: Traditional usage has performance penalties over multiple commands.
Located in /valve_rcon.php (line 65)
Class Constructor
Assemble Packets
By default source packets are not very useful. If you pass an array of them to this function it will do it's best to aggrogate the packets into one concise response.
Return array structure
Authenticate
In the case of source, connect and send password In the case of classic, connect and ask the server to say hi back
Classic Read
Read data from servers using the classic protocol Optionally strips that extra character from the front of the return. Not entirely sure it's a good idea to do that - as it does serve a purpose...
Classic Timeout Getter/Setter
Returns the current value of the classic timeout, or replaces it with a passed value.
You shouldn't need to tweak this, but it's here in case you do
Classic Write
Write data to servers using the classic protocol
Connect
Connect to the server
Disconnect
Disconnect from the server
Execute
This is the big function, this right here is the portal to the whole entire complex world that this class represents
It doesn't matter which type of rcon you are using, be it classic or source. To get somewhere in life all you have to do is execute($command)
Host Getter/Setter
Returns the current value of host, or replaces it with passed value
Port Getter/Setter
Returns the current value of port, or replaces it with passed value
Protocol Getter/Setter
Returns the current value of protocol, or replaces it with passed value
Defined constants: PROTO_CLASSIC, PROTO_SOURCE
Smart UDP Read
Face it, when it comes to reading UDP packets, PHP is rather dumb This gives us a slightly smarter udp read that waits for the socket to be unblocked and keeps reading until there's no more waiting data.
Socket Timeout Setter/Getter
Sets the socket timeout to the number of seconds + the number of microseconds if passed otherwise just returns the current settings
Source Read
Read data from servers using the source protocol Optionally ignores all packets that don't match the ID passed Optionally can speed up the process slightly (a few MS nothing more) by only waiting for a specific number of packets - useful if you KNOW how many packets your command is going to return, but generally not recommended. Return array structure
Source Write
Write data to servers using the source protocol
Defined constants: SERVERDATA_EXECCOMMAND, SERVERDATA_AUTH
Classic Protocol
Constants required for setting which protocol the class is using
Source Protocol - The default mode of operation
Constants required for setting which protocol the class is using
Constants used internally for talking to/from the server
Constants used internally for talking to/from the server
Constants used internally for talking to/from the server
Constants used internally for talking to/from the server
Documentation generated on Thu, 07 Aug 2008 09:42:37 +1000 by phpDocumentor 1.3.2