feiyu02
2025-09-30 a3cc1d220f8a1de11874bebceba0130d32157ff1
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 org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
 
@Component
class ServerManager {
 
    @Autowired
    private lateinit var tcpServer: AbstractNettyServer
 
    @Throws(Exception::class)
    fun startServer(port: Int) {
        tcpServer.startServer(port)
    }
 
    @Throws(Exception::class)
    fun startServer() {
        println("tcpserver: " + tcpServer)
        tcpServer.startServer()
    }
 
    @Throws(Exception::class)
    fun stopServer() {
        tcpServer.stopServer()
    }
}