fishconstants.java
来自「本系统实现在几台计算机屏幕上连贯地显示一条鱼游动大动画.」· Java 代码 · 共 29 行
JAVA
29 行
//FishConstants定义了一些常量比如端口和组播地址
package fish;
public interface FishConstants
{
//组播datagrams的IP地址
public static final String MULTICAST_ADDRESS = "239.0.0.1";
//监听组播datagrams的端口
public static final int MULTICAST_LISTENING_PORT = 5555;
//发送组播datagrams的端口
public static final int MULTICAST_SENDING_PORT = 5554;
//FishServer的Socket端口
public static final int SERVER_PORT = 12345;
//显示断开的字符串
public static final String DISCONNECT_STRING = "DISCONNECT";
//分开消息信息和clientID的分隔符
public static final String MESSAGE_SEPARATOR = ">>>";
//分开fish状态的分隔符
public static String ARRAY_SEPARATOR = "&";
//消息大小
public static final int MESSAGE_SIZE = 512;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?