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 {
Util.println("\nAccepting ...");
var socket = serverSocket.accept();
new SocketThread(MainActivity.ins, socket).start();
new TCPThread(MainActivity.ins, socket).start();
Util.println("\nAccepted");
} catch (Throwable e) {
var ins = MainActivity.ins;

View File

@ -36,14 +36,14 @@ import gnph.util.JSMap;
import gnph.util.NumFmts;
import gnph.util.O;
public class SocketThread extends Thread {
public class TCPThread extends Thread {
MainActivity main;
Socket socket;
InputStream in;
OutputStream out;
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.socket = socket;
}

View File

@ -30,7 +30,7 @@ public class Util {
static {
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<>();
static {
stateDescs.put(1, new String[]{"Initialize", "初始化"});