You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"io.ktor:ktor-network:2.3.7" open TCP error Message from debugger: Terminated due to signal 13
How can TCP be configured to solve this problem Terminated due to signal 13
coding:
private suspend fun performConnect() {
try {
_connectionState.value = ConnectionState.CONNECTING
logger.d(TAG, "开始连接 ${config.host}:${config.port}")
// 清理旧连接
cleanupConnection()
val client = aSocket(selectorManager).tcp()
socket = withTimeout(config.connectTimeout) {
val address = InetSocketAddress(config.host, config.port)
client.connect(address,) {
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
"io.ktor:ktor-network:2.3.7" open TCP error Message from debugger: Terminated due to signal 13
How can TCP be configured to solve this problem Terminated due to signal 13
coding:
private suspend fun performConnect() {
try {
_connectionState.value = ConnectionState.CONNECTING
logger.d(TAG, "开始连接 ${config.host}:${config.port}")
// // 设置连接超时
// socketTimeout = 30000
// // 设置接收缓冲区大小
// receiveBufferSize = 8192
//
// // 设置发送缓冲区大小
// sendBufferSize = 8192
// // 启用 TCP_NODELAY(禁用 Nagle 算法)
// noDelay = true
// .tls(Dispatchers.IO) {
// serverName = "chat2.jd.com"
// }
}
// startHeartbeat()
Beta Was this translation helpful? Give feedback.
All reactions