mirror of
https://github.com/tursom/TursomServer.git
synced 2024-12-28 05:40:12 +08:00
fix http server's web socket unusable bug
This commit is contained in:
parent
a9015bcdb4
commit
06ff1a54f5
@ -29,8 +29,8 @@ class NettyHttpServer(
|
||||
var webSocketPath: Iterable<Pair<String, WebSocketHandler<NettyWebSocketContent>>> = listOf(),
|
||||
var readTimeout: Int? = 60,
|
||||
var writeTimeout: Int? = null,
|
||||
decodeType: NettyHttpDecodeType = NettyHttpDecodeType.MULTI_PART,
|
||||
backlog: Int = 1024
|
||||
decodeType: NettyHttpDecodeType = if (webSocketPath.iterator().hasNext()) NettyHttpDecodeType.FULL_HTTP else NettyHttpDecodeType.MULTI_PART,
|
||||
backlog: Int = 1024,
|
||||
) : HttpServer {
|
||||
constructor(
|
||||
port: Int,
|
||||
@ -39,8 +39,8 @@ class NettyHttpServer(
|
||||
webSocketPath: Iterable<Pair<String, WebSocketHandler<NettyWebSocketContent>>> = listOf(),
|
||||
readTimeout: Int? = 60,
|
||||
writeTimeout: Int? = null,
|
||||
decodeType: NettyHttpDecodeType = NettyHttpDecodeType.MULTI_PART,
|
||||
handler: (content: NettyHttpContent) -> Unit
|
||||
decodeType: NettyHttpDecodeType = if (webSocketPath.iterator().hasNext()) NettyHttpDecodeType.FULL_HTTP else NettyHttpDecodeType.MULTI_PART,
|
||||
handler: (content: NettyHttpContent) -> Unit,
|
||||
) : this(
|
||||
port,
|
||||
object : HttpHandler<NettyHttpContent, NettyExceptionContent> {
|
||||
|
Loading…
Reference in New Issue
Block a user