feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cn.flightfeather.supervision.infrastructure.service;
 
import java.net.InetSocketAddress;
 
public interface NtServer {
 
    public interface TransmissionProtocol{
    }
    // 服务器使用的协议
    public enum TRANSMISSION_PROTOCOL implements TransmissionProtocol {
        TCP,UDP
    }
 
    TransmissionProtocol getTransmissionProtocol();
    // 启动服务器
    void startServer() throws Exception;
 
    void startServer(int port) throws Exception;;
 
    void startServer(InetSocketAddress socketAddress) throws Exception;
 
    // 关闭服务器
    void stopServer() throws Exception;
 
    InetSocketAddress getSocketAddress();
 
}