Net setup interf in function

This commit is contained in:
Djeeberjr 2022-03-01 12:56:15 +01:00
parent 3e275e2b06
commit 639392c6de

View File

@ -34,12 +34,16 @@ class Net {
this.interfaces.push(Loopback.instance);
for (interf in interfaces){
interf.onMessage.handle(pack -> handle(pack,interf));
interf.listen(networkID);
interf.listen(BRODCAST_PORT);
setupInterf(interf);
}
}
private function setupInterf(interf: INetworkInterface) {
interf.onMessage.handle(pack -> handle(pack,interf));
interf.listen(networkID);
interf.listen(BRODCAST_PORT);
}
/**
Called when a new package comes in.
**/