projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df537f1
)
2002/06/23 21:30:32
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:48:20 +0000
(06:48 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 06:48:20 +0000
(06:48 +0000)
darcs-hash:
20040130064820
-2ba56-
80efe23e7ba6f05590e46302c7ed3a87ccaec2db
.gz
CHANGES
patch
|
blob
|
history
src/org/xwt/Platform.java
patch
|
blob
|
history
diff --git
a/CHANGES
b/CHANGES
index
a0d51a2
..
9b26365
100644
(file)
--- a/
CHANGES
+++ b/
CHANGES
@@
-206,3
+206,6
@@
23-Jun megacz Main.java: lightened splash screen
23-Jun megacz Main.java: lightened splash screen
+23-Jun megacz Platform.java: no longer invokes System.exit() from
+ applet, setTcpNoDelay() in Platform.getSocket()
+
diff --git
a/src/org/xwt/Platform.java
b/src/org/xwt/Platform.java
index
02e75dd
..
959c775
100644
(file)
--- a/
src/org/xwt/Platform.java
+++ b/
src/org/xwt/Platform.java
@@
-73,7
+73,7
@@
public class Platform {
if (platform_class == null) {
if (Log.on) Log.log(Platform.class, "Unable to detect JVM");
if (platform_class == null) {
if (Log.on) Log.log(Platform.class, "Unable to detect JVM");
- System.exit(-1);
+ new Platform().criticalAbort("Unable to detect JVM");
}
if (Log.on) Log.log(Platform.class, " platform = " + platform.getDescriptiveName());
}
if (Log.on) Log.log(Platform.class, " platform = " + platform.getDescriptiveName());
@@
-82,7
+82,7
@@
public class Platform {
} catch (Exception e) {
if (Log.on) Log.log(Platform.class, "Exception while trying to detect JVM");
if (Log.on) Log.log(Platform.class, e);
} catch (Exception e) {
if (Log.on) Log.log(Platform.class, "Exception while trying to detect JVM");
if (Log.on) Log.log(Platform.class, e);
- System.exit(-1);
+ new Platform().criticalAbort("Unable to detect JVM");
}
}
}
}
@@
-106,7
+106,9
@@
public class Platform {
/** creates a socket object */
protected Socket _getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
/** creates a socket object */
protected Socket _getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
- return ssl ? new TinySSL(host, port, negotiate) : new Socket(java.net.InetAddress.getByName(host), port);
+ Socket ret = ssl ? new TinySSL(host, port, negotiate) : new Socket(java.net.InetAddress.getByName(host), port);
+ ret.setTcpNoDelay(true);
+ return ret;
}
/** creates and returns a picture */
}
/** creates and returns a picture */
@@
-156,10
+158,18
@@
public class Platform {
}
/** quits XWT */
}
/** quits XWT */
- protected void _exit() { System.exit(0); }
+ protected void _exit() {
+ if (Main.applet == null) {
+ System.exit(0);
+ } else {
+ // just block ourselves forever
+ // FIXME: implement this with an exit variable for MessageQueue and plat.*.eventThread
+ new Semaphore().block();
+ }
+ }
/** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
/** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
- protected void _criticalAbort(String message) { System.exit(-1); }
+ protected void _criticalAbort(String message) { _exit(); }
/** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
protected String _getDefaultFont() { return "sansserif10"; }
/** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
protected String _getDefaultFont() { return "sansserif10"; }