File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
serial/src/processing/serial Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ protected int clientIndex(Client client) {
176176 return -1 ;
177177 }
178178
179+ /**
180+ * Return true if this server is still active and hasn't run
181+ * into any trouble.
182+ */
183+ public boolean active () {
184+ return (thread != null );
185+ }
179186
180187 static public String ip () {
181188 try {
Original file line number Diff line number Diff line change @@ -135,6 +135,15 @@ public void dispose() {
135135 }
136136
137137
138+ /**
139+ * Return true if this port is still active and hasn't run
140+ * into any trouble.
141+ */
142+ public boolean active () {
143+ return (port .isOpened ());
144+ }
145+
146+
138147 public void pre () {
139148 if (serialAvailableMethod != null && invokeSerialAvailable ) {
140149 invokeSerialAvailable = false ;
You can’t perform that action at this time.
0 commit comments