?? tcpserver.java
字號:
package com.aceway.vas.commons.tcp;
import java.io.Serializable;
public interface TcpServer {
// 首先調用這個方法, 然后調用beginListen(int port)
void setDataHandler(IServerHandler handler, int maxPacketSize);
public boolean beginListen(int port);
public boolean beginListen(int port, String ipAddress);
// 將服務器端關閉, 也就是的關閉對某個端口的監聽
public boolean endListening();
// 往客戶端發消息
public int sendToClient(int connectId, byte[] bytes);
public int sendToClient(int connectId, Serializable obj);
public void attach(int connectId, Object obj);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -