Removed libevent

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-16 16:12:15 +02:00
parent 072e1328f1
commit 1f8987183b
3 changed files with 5 additions and 29 deletions

View File

@ -40,12 +40,10 @@ The entire server is done in PHP, and has been tested, profiled and optimized to
* __[PHP SQLite3](http://php.net/manual/en/book.sqlite3.php)__
* __[PHP BCMath](http://php.net/manual/en/book.bc.php)__
* __[PHP pthreads](https://github.com/krakjoe/pthreads)__ by _[krakjoe](https://github.com/krakjoe)_: Threading for PHP - Share Nothing, Do Everything.
* __[PHP Event](https://bitbucket.org/osmanov/pecl-event)__ by _[osmanov](https://bitbucket.org/osmanov)_: Event provides an interface to `libevent` C library.
* __[PHP NBT](https://github.com/TheFrozenFire/PHP-NBT-Decoder-Encoder/blob/master/nbt.class.php)__ by _[TheFrozenFire](https://github.com/TheFrozenFire)_: Class for reading in NBT-format files (modified to handle Little-Endian files).
* __[Spyc](https://github.com/mustangostang/spyc/blob/master/Spyc.php)__ by _[Vlad Andersen](https://github.com/mustangostang)_: A simple YAML loader/dumper class for PHP.
* __[ANSICON](https://github.com/adoxa/ansicon)__ by _[Jason Hood](https://github.com/adoxa)_: Process ANSI escape sequences for Windows console programs.
* __[cURL](http://curl.haxx.se/)__: cURL is a command line tool for transferring data with URL syntax
* __[Zlib](http://www.zlib.net/)__: A Massively Spiffy Yet Delicately Unobtrusive Compression Library
* __[libevent](http://libevent.org/)__: An event notification library
* __[Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol)__
* __[UT3 Query Protocol](http://wiki.unrealadmin.org/UT3_query_protocol)__

View File

@ -302,9 +302,6 @@ class ConsoleLoop extends Thread{
public function stop(){
$this->stop = true;
if(HAS_EVENT and false){
$this->base->stop();
}
}
public function readLine($fp, $events = null){
@ -315,24 +312,11 @@ class ConsoleLoop extends Thread{
}
public function run(){
$fp = fopen("php://stdin", "r");
if(HAS_EVENT and false){
$this->base = new EventBase();
$this->ev = new Event($this->base, $fp, Event::READ | Event::PERSIST, array($this, "readLine"));
$this->ev->add();
while($this->stop === false){
$this->base->loop(EventBase::LOOP_ONCE);
if($this->line !== false){
$this->wait();
$this->line = false;
}
}
}else{
while($this->stop === false and ($line = fgets($fp)) !== false){
$this->line = $line;
$this->wait();
$this->line = false;
}
$fp = fopen("php://stdin", "r");
while($this->stop === false and ($line = fgets($fp)) !== false){
$this->line = $line;
$this->wait();
$this->line = false;
}
@fclose($fp);
exit(0);

View File

@ -80,12 +80,6 @@ if(!extension_loaded("zlib") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") .
++$errors;
}
if(extension_loaded("event")){
define("HAS_EVENT", true);
}else{
define("HAS_EVENT", false);
}
if($errors > 0){
console("[ERROR] Please use the installer provided on the homepage.", true, true, 0);
exit(1); //Exit with error