| | |
| | | package com.flightfeather.uav.socket |
| | | |
| | | import com.flightfeather.uav.domain.repository.SceneInfoRep |
| | | import com.flightfeather.uav.domain.repository.SourceTraceRep |
| | | import com.flightfeather.uav.socket.handler.ServerHandler |
| | | import com.flightfeather.uav.socket.handler.UnderwayWebSocketServerHandler |
| | | import com.flightfeather.uav.socket.processor.BaseProcessor |
| | |
| | | * *******************************************************************************/ |
| | | @Component |
| | | class UnderwaySocketServer( |
| | | private val sceneInfoRep: SceneInfoRep |
| | | private val sceneInfoRep: SceneInfoRep, |
| | | private val sourceTraceRep: SourceTraceRep |
| | | ) { |
| | | |
| | | private val bossGroup = NioEventLoopGroup() |
| | |
| | | ?.addLast(HttpServerCodec()) |
| | | ?.addLast(HttpObjectAggregator(65535)) |
| | | ?.addLast(WebSocketServerProtocolHandler("/ws")) |
| | | ?.addLast(UnderwayWebSocketServerHandler(sceneInfoRep)) |
| | | ?.addLast(UnderwayWebSocketServerHandler(sceneInfoRep, sourceTraceRep)) |
| | | } |
| | | }) |
| | | } |