Created
December 30, 2010 08:31
-
-
Save koraktor/759593 to your computer and use it in GitHub Desktop.
Customizing socket timeouts in Steam Condenser (>= 0.12.0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'steam-condenser.php'; | |
// Setting the timeout to 50ms (default is 1000ms / 1s) | |
SteamSocket::setTimeout(50); | |
// Query a local server which should respond quite fast | |
$server = new SourceServer(new InetAddress('192.168.0.5')); | |
$server->getRules(); | |
// Setting the timeout to 2000ms | |
SteamSocket::setTimeout(2000); | |
// Query a server somewhere in the internet, it may be slow | |
$server = new SourceServer(new InetAddress('server.far.away')); | |
$server->getRules(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment