2015-06-22 22:52:26 +02:00
|
|
|
The CommuncationListening of the Communcation Manager can be enabled in the ingame Settings.
|
2015-06-21 21:45:52 +02:00
|
|
|
|
2015-06-22 22:52:26 +02:00
|
|
|
There the following settings are existing:
|
|
|
|
-- Enable Socket Listening (Let the CommunicationManager listen for incoming calls)
|
2017-03-16 18:29:04 +01:00
|
|
|
-- Password (Password which get used to encrypt and decrypt the messages for the openssl connection)
|
2015-06-22 22:52:26 +02:00
|
|
|
-- Listening port for every server (this is the port the CommunicationManager listens at)
|
|
|
|
|
2015-06-23 16:57:11 +02:00
|
|
|
|
|
|
|
For the description of the available implemented communcation Methods check the CommunicationMethods interface.
|
|
|
|
|
2015-06-26 13:25:29 +02:00
|
|
|
If you need methods which are not implemented, or additional Parameters, feel free to contact us.
|
2015-06-23 16:57:11 +02:00
|
|
|
|
2015-06-22 22:52:26 +02:00
|
|
|
Sample ManiaControl Implementation (for ManiaControl to ManiaControl connections)
|
|
|
|
|
|
|
|
##php code begin
|
2017-03-26 21:21:19 +02:00
|
|
|
//This Sample shows just the Implementation of the Method GET_SERVER_CHAT
|
2017-05-08 15:02:03 +02:00
|
|
|
|
|
|
|
//Caller Side
|
2015-06-22 22:52:26 +02:00
|
|
|
$communication = $this->maniaControl->getCommunicationManager()->createCommunication(IP/Domain, PORT, 'YOUR_PASSWORD');
|
2015-06-23 16:57:11 +02:00
|
|
|
$communication->call(function($data){
|
2017-03-26 21:21:19 +02:00
|
|
|
//$data includes the data sent by the Website / other Controller
|
2017-05-08 15:02:03 +02:00
|
|
|
return new CommunicationAnswer($data); //send data back
|
2015-06-22 22:52:26 +02:00
|
|
|
}, CommunicationMethods::GET_SERVER_CHAT);
|
2017-05-08 15:02:03 +02:00
|
|
|
|
|
|
|
//Callee Side
|
|
|
|
$this->maniaControl->getCommunicationManager()->registerCommunicationListener(CommunicationMethods::GET_SERVER_CHAT, $this, function ($data) {
|
2017-05-08 15:06:38 +02:00
|
|
|
return new CommunicationAnswer($this->chatBuffer);
|
|
|
|
});
|
2015-06-22 22:52:26 +02:00
|
|
|
##php code end
|
|
|
|
|
2017-05-25 16:31:24 +02:00
|
|
|
If you want to use the Communication Manager from a PHP Website you can use the Control-It Communication WEB-SDK
|
|
|
|
https://github.com/ManiaControl/Control-It-Communication-WEB-SDK
|