Advertisement
Guest User

Untitled

a guest
Mar 28th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.68 KB | None | 0 0
  1. @:rpc(server)
  2. class ServerAPI extends RPCHandler implements RPC {
  3.     @:rpc public function isServerAlive():Bool {
  4.         return true;
  5.     }
  6.    
  7.     @:rpc public function getSystemInfo():OZWJson {
  8.         var json = new OZWJson();
  9.         return json;
  10.     }
  11.    
  12.     @:rpc public function onEvent(event:String):Void;
  13. }
  14.  
  15. //////////////////////////////////////////////////////
  16.  
  17. @:rpc(client)
  18. class ClientAPI implements RPC {
  19.     public function new() {
  20.     }
  21.    
  22.     @:rpc public function isServerAlive():Bool;
  23.     @:rpc public function getSystemInfo():OZWJson;
  24.    
  25.     @:rpc public function onEvent(event:String):Void {
  26.         trace("ON EVENT - " + event);
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement