Dedicated Server API Client Communication

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: Dedicated Server API Client Communication

Post by The_Big_Boo »

Slig wrote:Mybe initialyse both variables before the unpack(), to avoid warning if the code using your lib have increased the warning verbosity/level ?
It doesn't give any warning neither. You can check it easily: ;)

Code: Select all

error_reporting(E_ALL);
extract(array('foo' => 'bar'));
echo $foo;
kremsy wrote:Now I was able to look into the wireshark packages:
http://www.pictures.esc-clan.net/upload/wirsh.png

It really looks like the dedi doesnt receive the Mehtod call (often retransmission) or it just dont send anything or something, but it's weired I'm pretty sure that the connection is not interrputed.
Hmmm... There isn't any packet sent/received for around 10 minutes so the connection interruption is actually an explanation, though I don't know who could have closed it (the dedicated, your machine or PHP...)
Last edited by The_Big_Boo on 18 Apr 2014, 10:21, edited 1 time in total.
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
User avatar
Slig
Posts: 637
Joined: 15 Jun 2010, 11:52
Location: TraXicoLand

Re: Dedicated Server API Client Communication

Post by Slig »

kremsy wrote:
Hmmm... There isn't any packet sent/received for around 10 minutes so the connection interruption is actually an explanation, though I don't know who could have closed it (the dedicated, your machine or PHP...
It seems like that is the point, but yeah the question is where that it caused by.
But shouldn't there be a connection in every callback read?
I think that Boo got it. I'm not sure how long it is, but i think that an unused tcp connection will timeout before 10min, either because of the client side, server side, router-nat, etc.
Note that many application which use tcp include a keepalive to avoid connection timeout.

In Fast, if there is no method call or callback recevied last 2 minutes then i do a GetServerName call to keepalive connection, and i never got your issue.
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: Dedicated Server API Client Communication

Post by The_Big_Boo »

kremsy wrote:By the way an solution to avoid varnings in the IDEs would be to declare phpdocs
I'm personally always deactivating "unitialized variable" check when working in PHP (because with file inclusions, it's often wrong). Moreover, in Netbeans, even with a phpdoc it'll show them as warnings or errors (as you can choose that in settings). I'll add them though, if it helps for other IDEs.


About the connection issue, I agree implementing some kind of keepalive is the best way to go.


And about the exception, I chose to have a new namespace without thinking it'll break exception catching everywhere :teub: I'll fix that ^^

Edit: fixed, and I added an idle timer so you can easily make a keepalive. You just need to call Connection->getIdleTime()
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
TheM
Posts: 1379
Joined: 15 Jun 2010, 14:30
Location: Uden, Noord-Brabant, Netherlands
Contact:

Re: Dedicated Server API Client Communication

Post by TheM »

@The_Big_Boo: it seems that changing to your GbxRemote causes some small problems when it comes to special characters in the chat: http://dump.klaversma.eu/ScreenCharacter.jpg.

I was first using the "old" communicator, until you see the weird A in the chat.
You can also see on the left that the nicknames are incorrect.

If you could fix that, it would be amazing! Apart from that: nice work! :thumbsup:

By the way, I have the xmlrpc extension enabled.
Global moderator | Dutch moderator | Laddermoderator | ManiaWiki moderator
Server Manager/webmaster of Smurfen.net, join us on Canyon, Valley and Royal!
ESL (Game) Staff Head for TrackMania (Stadium, Canyon and Valley).
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Dedicated Server API Client Communication

Post by TMarc »

This is a typical "language encoding" problem of XML (also seen that in totally different areas).
I guess switching to Unicode would probably solve it.
Post Reply

Return to “Dedicated Server Tools”

Who is online

Users browsing this forum: No registered users and 1 guest