fix: socket
This commit is contained in:
@@ -12,6 +12,9 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.net.Socket;
|
||||
|
||||
/**
|
||||
* @author 20220102CG\noblelift
|
||||
*/
|
||||
public class ClientUDWReceive implements Runnable {
|
||||
private static final Logger log = LoggerFactory.getLogger(ClientUDWReceive.class);
|
||||
private InputStream is;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package org.nl.acs.socket;
|
||||
|
||||
/**
|
||||
* @author 20220102CG\noblelift
|
||||
*/
|
||||
public class SocketConfig {
|
||||
public static String udw_unit_key = "socket";
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* @author 20220102CG\noblelift
|
||||
*/
|
||||
@Component
|
||||
public class SocketListenerAutoRun extends AbstractAutoRunnable implements SocketService {
|
||||
private static final Logger log = LoggerFactory.getLogger(SocketListenerAutoRun.class);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.nl.acs.socket;
|
||||
|
||||
/**
|
||||
* @author 20220102CG\noblelift
|
||||
*/
|
||||
public class SocketProperties {
|
||||
public static Integer server_port = 10000;
|
||||
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
package org.nl.acs.socket;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* @author 20220102CG\noblelift
|
||||
*/
|
||||
public interface SocketService {
|
||||
/**
|
||||
* 判断客户端是否在线
|
||||
*
|
||||
* @param var1
|
||||
* @return
|
||||
*/
|
||||
boolean isOnline(String var1);
|
||||
|
||||
/**
|
||||
* 获取客户端输出流
|
||||
* @param var1
|
||||
* @return
|
||||
*/
|
||||
OutputStream getOutputStream(String var1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user