made Net a static class
This commit is contained in:
@@ -45,7 +45,7 @@ class Debug {
|
||||
|
||||
#if webconsole
|
||||
public static function printWeb(msg:String) {
|
||||
HTTP.request("http://127.0.0.1:8080/"+Net.instance.networkID,msg);
|
||||
HTTP.request("http://127.0.0.1:8080/"+Net.networkID,msg);
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class RessourceNames {
|
||||
|
||||
var payload: GetRequest = {name: name, type: "get"};
|
||||
|
||||
return Net.instance.sendAndAwait(
|
||||
return Net.sendAndAwait(
|
||||
controllerID,
|
||||
SiteRessourceController.SITE_CONTROLLER_RESSOURCE_MANAGER_PROTO,
|
||||
payload
|
||||
@@ -36,7 +36,7 @@ class RessourceNames {
|
||||
|
||||
var payload: RegisterRequest = {name: name, netID: netID, type: "register"};
|
||||
|
||||
return Net.instance.sendAndAwait(
|
||||
return Net.sendAndAwait(
|
||||
controllerID,
|
||||
SiteRessourceController.SITE_CONTROLLER_RESSOURCE_MANAGER_PROTO,
|
||||
payload
|
||||
@@ -56,7 +56,7 @@ class RessourceNames {
|
||||
|
||||
var payload: UnregisterRequest = {name: name, type: "unregister"};
|
||||
|
||||
return Net.instance.sendAndAwait(
|
||||
return Net.sendAndAwait(
|
||||
controllerID,
|
||||
SiteRessourceController.SITE_CONTROLLER_RESSOURCE_MANAGER_PROTO,
|
||||
payload
|
||||
@@ -68,7 +68,7 @@ class RessourceNames {
|
||||
|
||||
var payload: ListRequest = {type: "list"};
|
||||
|
||||
return Net.instance.sendAndAwait(
|
||||
return Net.sendAndAwait(
|
||||
controllerID,
|
||||
SiteRessourceController.SITE_CONTROLLER_RESSOURCE_MANAGER_PROTO,
|
||||
payload
|
||||
|
||||
@@ -15,7 +15,7 @@ class Import {
|
||||
}
|
||||
|
||||
private static function performRequest(netID: NetworkID, request: Request): Promise<Response> {
|
||||
return Net.instance.sendAndAwait(netID,"res",request).map((response)->{
|
||||
return Net.sendAndAwait(netID,"res",request).map((response)->{
|
||||
switch (response){
|
||||
case Success(data):
|
||||
return Success(cast (data.data, Response));
|
||||
|
||||
Reference in New Issue
Block a user