made Net a static class

This commit is contained in:
2023-07-30 15:38:46 +02:00
parent 505d318ffb
commit 97c906e013
15 changed files with 58 additions and 59 deletions

View File

@@ -71,7 +71,7 @@ class RPC {
}
return macro {
kernel.net.Net.instance.registerProto($v{proto},(pack)->{
kernel.net.Net.registerProto($v{proto},(pack)->{
$a{exprs}
});
};

View File

@@ -14,7 +14,7 @@ abstract class RPCBase {
}
private function _performRequest(func: String, args: Array<Dynamic>):Promise<Dynamic> {
return Net.instance.sendAndAwait(id, this._proto, {
return Net.sendAndAwait(id, this._proto, {
func: func,
// args: args
}).map((res) -> {