Split player into more methods, added extra timings

This commit is contained in:
Shoghi Cervantes
2015-06-05 00:19:31 +02:00
parent 188f4d7778
commit d542dfc2ce
4 changed files with 115 additions and 66 deletions

View File

@ -1895,6 +1895,7 @@ class Server{
* @param int $channel
*/
public function batchPackets(array $players, array $packets, $forceSync = false, $channel = 0){
Timings::$playerNetworkTimer->startTiming();
$str = "";
foreach($packets as $p){
@ -1921,6 +1922,8 @@ class Server{
}else{
$this->broadcastPacketsCallback(zlib_encode($str, ZLIB_ENCODING_DEFLATE, $this->networkCompressionLevel), $targets, $channel);
}
Timings::$playerNetworkTimer->stopTiming();
}
public function broadcastPacketsCallback($data, array $identifiers, $channel = 0){