diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/network/AutoServer.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/network/AutoServer.java')
| -rw-r--r-- | NET/worlds/network/AutoServer.java | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/NET/worlds/network/AutoServer.java b/NET/worlds/network/AutoServer.java new file mode 100644 index 0000000..a519706 --- /dev/null +++ b/NET/worlds/network/AutoServer.java @@ -0,0 +1,145 @@ +/* */ package NET.worlds.network; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AutoServer +/* */ extends WorldServer +/* */ { +/* 36 */ private static int counter = 0; +/* */ +/* */ +/* */ +/* */ public AutoServer() +/* */ { +/* 42 */ if (counter++ > 0) { +/* 43 */ System.out.println("DEBUG: Created second AutoServer class."); +/* 44 */ Galaxy.printDebugging(); +/* 45 */ new Exception().printStackTrace(System.out); +/* */ } +/* */ } +/* */ +/* */ +/* */ public synchronized void incRefCnt(Object referrer) +/* */ { +/* 52 */ super.incRefCnt(referrer); +/* 53 */ startConnect(); +/* */ } +/* */ +/* */ protected void state_Authprompt() +/* */ { +/* 58 */ this._state.setState(3); +/* */ } +/* */ +/* */ protected void state_XMIT_SI() +/* */ { +/* 63 */ WorldServer newServer = null; +/* */ +/* */ +/* 66 */ int servType = getServerType(); +/* */ +/* 68 */ if ((getDebugLevel() & 0x20) > 0) { +/* 69 */ System.out.println(this + ": AutoServer detected server type " + +/* 70 */ servType); +/* */ } +/* */ +/* 73 */ switch (servType) { +/* */ case 1: +/* 75 */ newServer = new UserServer(); +/* 76 */ break; +/* */ case 2: +/* 78 */ newServer = new AnonUserServer(); +/* 79 */ break; +/* */ case 3: +/* 81 */ Console.println(this + Console.message("Error-in-server")); +/* 82 */ Console.println(this + Console.message("Error-user-server")); +/* 83 */ newServer = null; +/* 84 */ break; +/* */ case 4: +/* 86 */ newServer = new AnonRoomServer(); +/* 87 */ break; +/* */ default: +/* 89 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ break; +/* */ } +/* 92 */ if (newServer != null) { +/* 93 */ newServer.reuseConnection(this); +/* 94 */ newServer.initInstance(this._galaxy, this._serverURL); +/* 95 */ newServer.propertyUpdate(this._propList); +/* */ } +/* */ +/* 98 */ this._galaxy.killServer(this); +/* */ +/* */ +/* 101 */ this._galaxy.swapServer(this, newServer); +/* */ +/* */ +/* 104 */ this._galaxy.setGalaxyType(servType); +/* */ +/* */ +/* */ +/* 108 */ if (this._refCnt - this._tmpRefCnt != 0) { +/* 109 */ System.out.println(this + +/* 110 */ ": bad reference counts. DEBUG INFO:"); +/* 111 */ System.out.println("\t_refCnt = " + this._refCnt); +/* 112 */ System.out.println("\t_tmpRefCnt = " + this._tmpRefCnt); +/* 113 */ printReferrers(); +/* */ } +/* */ +/* 116 */ assert (this._refCnt - this._tmpRefCnt == 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 124 */ this._state.setState(17); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 129 */ return "AutoServer(" + super.toString() + ")"; +/* */ } +/* */ +/* */ void goOnline() +/* */ { +/* 134 */ super.goOnline(); +/* */ +/* 136 */ System.out.println("DEBUG: AutoServer going online!"); +/* 137 */ new Exception().printStackTrace(System.out); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\AutoServer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |