This commit is contained in:
Gangphon 2024-11-25 11:50:10 +08:00
parent 997ed20c5e
commit d54251ed16
3 changed files with 4 additions and 4 deletions

View File

@ -676,7 +676,7 @@ public class MainActivity extends Activity implements Choreographer.FrameCallbac
try { try {
Util.println("\nAccepting ..."); Util.println("\nAccepting ...");
var socket = serverSocket.accept(); var socket = serverSocket.accept();
new SocketThread(MainActivity.ins, socket).start(); new TCPThread(MainActivity.ins, socket).start();
Util.println("\nAccepted"); Util.println("\nAccepted");
} catch (Throwable e) { } catch (Throwable e) {
var ins = MainActivity.ins; var ins = MainActivity.ins;

View File

@ -36,14 +36,14 @@ import gnph.util.JSMap;
import gnph.util.NumFmts; import gnph.util.NumFmts;
import gnph.util.O; import gnph.util.O;
public class SocketThread extends Thread { public class TCPThread extends Thread {
MainActivity main; MainActivity main;
Socket socket; Socket socket;
InputStream in; InputStream in;
OutputStream out; OutputStream out;
SimpleDateFormat fmt = new SimpleDateFormat("MM-dd HH:mm:ss"); SimpleDateFormat fmt = new SimpleDateFormat("MM-dd HH:mm:ss");
public SocketThread(MainActivity main, Socket socket) { public TCPThread(MainActivity main, Socket socket) {
this.main = main; this.main = main;
this.socket = socket; this.socket = socket;
} }

View File

@ -30,7 +30,7 @@ public class Util {
static { static {
noScaled.inScaled = false; noScaled.inScaled = false;
} }
public static final Vector<SocketThread> socketThreads = new Vector<>(); public static final Vector<TCPThread> socketThreads = new Vector<>();
public static final HashMap<Integer, String[]> stateDescs = new HashMap<>(); public static final HashMap<Integer, String[]> stateDescs = new HashMap<>();
static { static {
stateDescs.put(1, new String[]{"Initialize", "初始化"}); stateDescs.put(1, new String[]{"Initialize", "初始化"});