-
Notifications
You must be signed in to change notification settings - Fork 4
callService
CaffeinatedRat edited this page Apr 24, 2013
·
1 revision
This method queries the Minecraft WebSocketServer for the service information specified.
The following is the method signature:
CaffeinatedRat.Minecraft.WebSocketServices.prototype.callService(service, parameters)
The following parameters are available for this method:
This is the name of the service to invoke.
This is a callback function that is called when the client-side library has successful received the service information.
- Value: function(jsonDataStructure) { }
- Default: Do nothing special.
The Json data structure will depend on the service being called.
The following is an example of how to use the method and its callback function.
function callback(json) { console.log('Data: ' + json.toString()); } wss.callService('serviceName', { callback: callback });