Commit Graph

18 Commits

Author SHA1 Message Date
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
e1e1bfa5e3 CompressBatchedTask: remove useless code causing build failure
assuming that pthreads does not have leak issues, this code is pointless, and if pthreads does have leak issues, this may not prevent them anyway.
2020-01-09 14:19:35 +00:00
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
f39fc7e525 CompressBatchedTask::__construct() accepts Player[] not string[] 2019-12-12 16:16:48 +00:00
9caf62778c AsyncTask: remove $serialize parameter from setResult()
Whether serialization is necessary can be determined automatically based on the type of variable.
2018-11-03 16:56:24 +00:00
f903dbfe00 Server: Removed identifiers array
This is completely unnecessary and adds extra complexity for no good reason. Maybe it was used historically, but nowadays it is only used to identify players to send async-prepared batch packets to.

There are two alternative ways to do that:
1. use spl_object_hash() as the targets array in CompressBatchedTask
2. use ServerScheduler's object storage to retain references to the Player[] array.

I've opted for the second method.

Removing these identifiers allows great code simplification in removePlayer() and removes the need for those old stupid hacks.

This also includes a backwards-compatibility break by removing the $identifier parameter of Server->addPlayer().
2018-02-27 11:43:02 +00:00
72d1948f30 Improved batch handling 2017-07-13 12:04:47 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
36c95660e6 Fixed some logic issues with async compression 2017-05-19 11:30:23 +01:00
17e4f45e97 Fixed kicking players not working properly 2017-04-18 19:41:09 +01:00
c5eccc8e1c Minor improvements to Batch encoding 2017-04-15 19:40:06 +01:00
074d7ed95c Resolve CompressBatchedTask-related crashes 2016-02-07 23:36:16 +09:00
3ffdb8e552 Removed @deprecated classes, methods and properties, added some type hints 2015-09-12 17:10:11 +02:00
e137ac4c56 Base PHP7 work to make it "run" - READ NEXT LINES!
All plugins will need to bump the API if they want to use this.
NOTE THAT THIS IS NOT THE FINAL API 2.0.0 AND THAT THERE WILL BE MORE CHANGES.
To start updating, you might also want to read https://secure.php.net/manual/en/migration70.php and specifically https://secure.php.net/manual/en/migration70.incompatible.php

To compile PHP7 with some of the required dependencies, use https://gist.github.com/shoghicp/166ab26ce5cc7a390f45
ONLY LINUX IS TESTED, DO NOT ASK FOR OTHER PLATFORMS!

----- THIS VERSION IS NOT SUPPORTED -----

This version WILL crash randomly in unexpected places due to PHP7, pthreads, PocketMine or cosmic rays.

Handle with care, and store under direct sunlight for the best performance.
2015-09-10 21:29:29 +02:00
094234dc0f Updated references and submodules 2015-04-19 15:37:18 +02:00
b2c25eaf36 Added MemoryManager, new memory properties, improved performance, updated RakLib, fixed misc. bugs 2015-04-18 20:13:52 +02:00
0b176b3fe0 Implemented Channeled packet sending 2015-04-14 18:24:40 +02:00
962c28aaca BatchPacket, compress any packet depending on the size, really fast threaded chunk sending 2015-03-26 00:06:46 +01:00