Page 11 of 12

Re: Dedicated Server API Client Communication

Posted: 19 Aug 2014, 12:38
by steeffeen
w1lla wrote:where it seems to be based on everyplayerconnect aswell as certain callbacks.
i don't really understand what you want to say, sorry

Re: Dedicated Server API Client Communication

Posted: 19 Aug 2014, 12:45
by w1lla
based on this:

Code: Select all

[13-Jul-2014 15:25:29 UTC] [ManiaControl EXCEPTION]: Connection timed out while reading header
Class: Maniaplanet\DedicatedServer\Xmlrpc\TransportException
Trace:
#0: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->onIoFailure(string(while reading header)) in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 225
#1: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->readMessage() in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 200
#2: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->flush(boolean(1)) in File core/Libs/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on Line 130
#3: Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->query(string(GetMaxPlayers), array()) in File core/Libs/Maniaplanet/DedicatedServer/Connection.php on Line 153
#4: Maniaplanet\DedicatedServer\Connection->execute(string(GetMaxPlayers), array(), boolean()) in File core/Libs/Maniaplanet/DedicatedServer/Connection.php on Line 1591
#5: Maniaplanet\DedicatedServer\Connection->getMaxPlayers() in File plugins/MCTeam/WidgetPlugin.php on Line 314
#6: MCTeam\WidgetPlugin->displayServerInfoWidget() in File plugins/MCTeam/WidgetPlugin.php on Line 534
#7: MCTeam\WidgetPlugin->updateWidgets(object(ManiaControl\Players\Player))
#8: call_user_func_array(array(object(MCTeam\WidgetPlugin), string(updateWidgets)), array(object(ManiaControl\Players\Player))...) in File core/Callbacks/Listening.php on Line 62
#9: ManiaControl\Callbacks\Listening->triggerCallbackWithParams(array(object(ManiaControl\Players\Player))) in File core/Callbacks/CallbackManager.php on Line 289
...
I think you might have slight issues in the part of getting maxPlayers or on PlayerConnect as where the player information gets updated.

Re: Dedicated Server API Client Communication

Posted: 19 Aug 2014, 12:52
by steeffeen
thanks

well we have pretty much no idea what we should change or improve because we are basically only executing calls and callbacks
i don't think we are doing anything special
and the spots where it happens aren't special in any way either, at least that seems to be the case

(to make that clear: i'm NOT saying "we are perfect and there is no possibility of an error on our side", we just can't think of a possible error ^^)

Re: Dedicated Server API Client Communication

Posted: 30 Nov 2014, 11:08
by The_Big_Boo
Though I agree Spl data structures are really great, the performance gain doesn't worth it in this case. As the main loop is fetching callbacks 60 times per second in ManiaLive and even more in ManiaControl, the buffer is often empty and rarely longer than a few callbacks. A SplQueue begins to be really more efficient when working with larger data, like hundreds of elements.

Re: Dedicated Server API Client Communication

Posted: 06 Feb 2016, 15:14
by oliverde8
Hi I just started to check out eXpansion with PHP7 and well it doesen't look good.

The issue is with special characters, I tried the fallowing code :

Code: Select all

require __DIR__ . '/vendor/autoload.php';

$connection =  Maniaplanet\DedicatedServer\Connection::factory('127.0.0.1', 5005, 5, 'SuperAdmin', 'SuperAdmin');

$connection->chatSendServerMessage('Héllo £world');
And in maniaplanet I don't see the "é" and the "£" properly.

For information I tried the latest version here : https://github.com/NewboO/dedicated-server-api

I am running with PHP7 :

Code: Select all

PHP 7.0.3 (cli) (built: Feb  2 2016 14:41:10) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
I also checked with the original dedicated server : https://github.com/maniaplanet/dedicated-server-api

and have the same issue with the original dedicated server api as well.

Not sure what causes it because it works fine for other applications so I don't think my PHP7 installation is causing it.

Re: Dedicated Server API Client Communication

Posted: 06 Feb 2016, 21:47
by The_Big_Boo
First thing first, my fork has been merged a few months ago (Jun 22, 2015 more precisely) so there's no reason to still rely on my repository ;)

Anyway, are you sure your file is UTF-8 encoded? Depending on your IDE/text editor, it may default to another encoding so that's the first thing you should check.