Closed TacTicToe66 closed 7 years ago
You need to implement
/**
* Method called to process query response data. Each extending class has to have one of these functions.
*
* @return mixed
*/
public function processResponse();
Thank you. Can you please tell me how to get the info being queried for this function? Everything I have tried thus far results in showing the server as offline.
Thanks!
@TacTicToe66 You are using a lot of the old functionality from v2 that doesn't really translate into v3. The v3 library was made more modular and slimmed things down a bit at the protocol class level. If you want to toy with this one I would use one of the v3 quake libraries as a starting point so you can see how the calls are made. I would not look at the v2 protocol class until you are ready to actually read the data out of the responses for server info, players, etc.. A lot of the v2 code can be reused from that point forward with some minor variable changes.
The majority of the work can be done in the processResponse() call that has to be built for every class extending the base Protocol class. The data coming back from the queries is stored in $this->packets_response which is where the work begins. I use the processResponse function to check the packets, decrypt, sort/merge them if needed and then offload the specific calls for player info, server info, etc... into other functions in the same class. This also allows specific calls for info to be overridden which comes in handy for some Source games when they decide not to follow the A2S protocol specification.
`<?php /**
namespace GameQ\Protocols;
use GameQ\Protocol; use GameQ\Buffer; use GameQ\Result; use GameQ\Exception\Protocol as Exception;
class Etqw extends Protocol {
} `
Not sure why it doesnt work. This is the error I am getting.