Skip to content
CaffeinatedRat edited this page Apr 24, 2013 · 1 revision

This method queries the Minecraft WebSocketServer for the service information specified.

Method Signature

The following is the method signature:

CaffeinatedRat.Minecraft.WebSocketServices.prototype.callService(service, parameters)

Parameters

The following parameters are available for this method:

service

This is the name of the service to invoke.

callback

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.

Example

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

});
Clone this wiki locally