Implements the active() method for Serial and Server (Issue #2364).

This commit is contained in:
Kyle Feuz
2014-06-10 23:22:08 -07:00
parent a7dbe905f8
commit 6274986bd6
2 changed files with 16 additions and 0 deletions

View File

@@ -176,6 +176,13 @@ public class Server implements Runnable {
return -1;
}
/**
* Return true if this server is still active and hasn't run
* into any trouble.
*/
public boolean active() {
return (thread != null);
}
static public String ip() {
try {