Net setup interf in function
This commit is contained in:
parent
3e275e2b06
commit
639392c6de
@ -34,11 +34,15 @@ class Net {
|
||||
this.interfaces.push(Loopback.instance);
|
||||
|
||||
for (interf in interfaces){
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user