Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
a0098966
Commit
a0098966
authored
Nov 29, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reconnection supported
parent
05ca6424
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
115 additions
and
72 deletions
+115
-72
UpdateLog.md
UpdateLog.md
+6
-0
gradle.properties
gradle.properties
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
+45
-12
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
...i-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
+3
-3
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt
...nMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt
+4
-6
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt
....mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt
+24
-44
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/LoginResult.kt
...oe.mirai/network/protocol/tim/packet/login/LoginResult.kt
+7
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/BotConfiguration.kt
...mmonMain/kotlin/net.mamoe.mirai/utils/BotConfiguration.kt
+21
-3
mirai-debug/src/main/kotlin/PacketDebuger.kt
mirai-debug/src/main/kotlin/PacketDebuger.kt
+4
-3
No files found.
UpdateLog.md
0 → 100644
View file @
a0098966
# UpdateLog
## Main version 0
### 0.3.0
-
更新
\ No newline at end of file
gradle.properties
View file @
a0098966
# style guide
# style guide
kotlin.code.style
=
official
kotlin.code.style
=
official
# config
# config
mirai_version
=
0.
3
.0
mirai_version
=
0.
5
.0
kotlin.incremental.multiplatform
=
true
kotlin.incremental.multiplatform
=
true
kotlin.parallel.tasks.in.project
=
true
kotlin.parallel.tasks.in.project
=
true
# kotlin
# kotlin
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
View file @
a0098966
...
@@ -12,11 +12,13 @@ import net.mamoe.mirai.contact.internal.QQImpl
...
@@ -12,11 +12,13 @@ import net.mamoe.mirai.contact.internal.QQImpl
import
net.mamoe.mirai.network.BotNetworkHandler
import
net.mamoe.mirai.network.BotNetworkHandler
import
net.mamoe.mirai.network.protocol.tim.TIMBotNetworkHandler
import
net.mamoe.mirai.network.protocol.tim.TIMBotNetworkHandler
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.isSuccess
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.DefaultLogger
import
net.mamoe.mirai.utils.DefaultLogger
import
net.mamoe.mirai.utils.MiraiLogger
import
net.mamoe.mirai.utils.MiraiLogger
import
net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
import
net.mamoe.mirai.utils.internal.coerceAtLeastOrFail
import
kotlin.coroutines.CoroutineContext
import
kotlin.coroutines.CoroutineContext
import
kotlin.coroutines.coroutineContext
import
kotlin.jvm.JvmOverloads
import
kotlin.jvm.JvmOverloads
data class
BotAccount
(
data class
BotAccount
(
...
@@ -24,6 +26,15 @@ data class BotAccount(
...
@@ -24,6 +26,15 @@ data class BotAccount(
val
password
:
String
//todo 不保存 password?
val
password
:
String
//todo 不保存 password?
)
)
@Suppress
(
"FunctionName"
)
suspend
inline
fun
Bot
(
account
:
BotAccount
,
logger
:
MiraiLogger
):
Bot
=
Bot
(
account
,
logger
,
coroutineContext
)
@Suppress
(
"FunctionName"
)
suspend
inline
fun
Bot
(
account
:
BotAccount
):
Bot
=
Bot
(
account
,
coroutineContext
)
@Suppress
(
"FunctionName"
)
suspend
inline
fun
Bot
(
qq
:
UInt
,
password
:
String
):
Bot
=
Bot
(
qq
,
password
,
coroutineContext
)
/**
/**
* Mirai 的机器人. 一个机器人实例登录一个 QQ 账号.
* Mirai 的机器人. 一个机器人实例登录一个 QQ 账号.
* Mirai 为多账号设计, 可同时维护多个机器人.
* Mirai 为多账号设计, 可同时维护多个机器人.
...
@@ -54,15 +65,16 @@ data class BotAccount(
...
@@ -54,15 +65,16 @@ data class BotAccount(
* @author NaturalHG
* @author NaturalHG
* @see Contact
* @see Contact
*/
*/
class
Bot
(
val
account
:
BotAccount
,
val
logger
:
MiraiLogger
)
:
CoroutineScope
{
class
Bot
(
val
account
:
BotAccount
,
val
logger
:
MiraiLogger
,
context
:
CoroutineContext
)
:
CoroutineScope
{
override
val
coroutineContext
:
CoroutineContext
=
SupervisorJob
()
private
val
supervisorJob
=
SupervisorJob
(
context
[
Job
])
override
val
coroutineContext
:
CoroutineContext
=
context
+
supervisorJob
constructor
(
qq
:
UInt
,
password
:
String
)
:
this
(
BotAccount
(
qq
,
password
)
)
constructor
(
qq
:
UInt
,
password
:
String
,
context
:
CoroutineContext
)
:
this
(
BotAccount
(
qq
,
password
),
context
)
constructor
(
account
:
BotAccount
)
:
this
(
account
,
DefaultLogger
(
"Bot("
+
account
.
id
+
")"
)
)
constructor
(
account
:
BotAccount
,
context
:
CoroutineContext
)
:
this
(
account
,
DefaultLogger
(
"Bot("
+
account
.
id
+
")"
),
context
)
val
contacts
=
ContactSystem
()
val
contacts
=
ContactSystem
()
var
network
:
BotNetworkHandler
<
*
>
=
TIMBotNetworkHandler
(
this
.
coroutineContext
,
this
)
lateinit
var
network
:
BotNetworkHandler
<
*
>
init
{
init
{
launch
{
launch
{
...
@@ -76,19 +88,40 @@ class Bot(val account: BotAccount, val logger: MiraiLogger) : CoroutineScope {
...
@@ -76,19 +88,40 @@ class Bot(val account: BotAccount, val logger: MiraiLogger) : CoroutineScope {
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
* 然后重新启动并尝试登录
*/
*/
@JvmOverloads
@JvmOverloads
// shouldn't be suspend!! This function MUST NOT inherit the context from the caller because the caller(NetworkHandler) is going to close
suspend
fun
reinitializeNetworkHandler
(
fun
tryReinitializeNetworkHandler
(
configuration
:
BotConfiguration
,
cause
:
Throwable
?
=
null
):
Job
=
launch
{
repeat
(
configuration
.
reconnectionRetryTimes
)
{
if
(
reinitializeNetworkHandlerAsync
(
configuration
,
cause
).
await
().
isSuccess
())
{
logger
.
info
(
"Reconnected successfully"
)
return
@
launch
}
else
{
delay
(
configuration
.
reconnectPeriod
.
millisecondsLong
)
}
}
}
/**
* [关闭][BotNetworkHandler.close]网络处理器, 取消所有运行在 [BotNetworkHandler] 下的协程.
* 然后重新启动并尝试登录
*/
@JvmOverloads
// shouldn't be suspend!! This function MUST NOT inherit the context from the caller because the caller(NetworkHandler) is going to close
fun
reinitializeNetworkHandlerAsync
(
configuration
:
BotConfiguration
,
configuration
:
BotConfiguration
,
cause
:
Throwable
?
=
null
cause
:
Throwable
?
=
null
):
LoginResult
{
):
Deferred
<
LoginResult
>
=
async
{
logger
.
info
(
"Initializing BotNetworkHandler"
)
logger
.
info
(
"Initializing BotNetworkHandler"
)
try
{
try
{
network
.
close
(
cause
)
if
(
::
network
.
isInitialized
)
{
network
.
close
(
cause
)
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
logger
.
error
(
e
)
logger
.
error
(
"Cannot close network handler"
,
e
)
}
}
network
=
TIMBotNetworkHandler
(
this
.
coroutineContext
,
this
)
network
=
TIMBotNetworkHandler
(
coroutineContext
+
configuration
,
this
@Bot
)
return
network
.
login
(
configuration
)
network
.
login
(
)
}
}
/**
/**
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/BotHelper.kt
View file @
a0098966
...
@@ -70,13 +70,13 @@ suspend inline fun Bot.login(noinline configuration: BotConfiguration.() -> Unit
...
@@ -70,13 +70,13 @@ suspend inline fun Bot.login(noinline configuration: BotConfiguration.() -> Unit
contract
{
contract
{
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
}
}
return
this
.
network
.
login
(
BotConfiguration
().
apply
(
configuration
)
)
return
this
.
reinitializeNetworkHandlerAsync
(
BotConfiguration
().
apply
(
configuration
)).
await
(
)
}
}
/**
/**
* 使用默认的配置 ([BotConfiguration.Default]) 登录, 返回登录结果
* 使用默认的配置 ([BotConfiguration.Default]) 登录, 返回登录结果
*/
*/
suspend
inline
fun
Bot
.
login
():
LoginResult
=
this
.
network
.
login
(
BotConfiguration
.
Default
)
suspend
inline
fun
Bot
.
login
():
LoginResult
=
this
.
reinitializeNetworkHandlerAsync
(
BotConfiguration
.
Default
).
await
(
)
/**
/**
* 使用默认的配置 ([BotConfiguration.Default]) 登录, 返回 [this]
* 使用默认的配置 ([BotConfiguration.Default]) 登录, 返回 [this]
...
@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(noinline configuration: BotConfiguration.() ->
...
@@ -91,7 +91,7 @@ suspend inline fun Bot.alsoLogin(noinline configuration: BotConfiguration.() ->
contract
{
contract
{
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
callsInPlace
(
configuration
,
InvocationKind
.
EXACTLY_ONCE
)
}
}
this
.
network
.
login
(
BotConfiguration
().
apply
(
configuration
)
).
requireSuccess
()
this
.
reinitializeNetworkHandlerAsync
(
BotConfiguration
().
apply
(
configuration
)).
await
(
).
requireSuccess
()
return
this
return
this
}
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/BotNetworkHandler.kt
View file @
a0098966
package
net.mamoe.mirai.network
package
net.mamoe.mirai.network
import
kotlinx.coroutines.CancellationException
import
kotlinx.coroutines.CancellationException
import
kotlinx.coroutines.CompletableJob
import
kotlinx.coroutines.CoroutineScope
import
kotlinx.coroutines.CoroutineScope
import
kotlinx.coroutines.SupervisorJob
import
kotlinx.coroutines.cancelChildren
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.network.protocol.tim.handler.DataPacketSocketAdapter
import
net.mamoe.mirai.network.protocol.tim.handler.DataPacketSocketAdapter
import
net.mamoe.mirai.network.protocol.tim.handler.TemporaryPacketHandler
import
net.mamoe.mirai.network.protocol.tim.handler.TemporaryPacketHandler
...
@@ -12,7 +11,6 @@ import net.mamoe.mirai.network.protocol.tim.packet.Packet
...
@@ -12,7 +11,6 @@ import net.mamoe.mirai.network.protocol.tim.packet.Packet
import
net.mamoe.mirai.network.protocol.tim.packet.login.HeartbeatPacket
import
net.mamoe.mirai.network.protocol.tim.packet.login.HeartbeatPacket
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.RequestSKeyPacket
import
net.mamoe.mirai.network.protocol.tim.packet.login.RequestSKeyPacket
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.io.PlatformDatagramChannel
import
net.mamoe.mirai.utils.io.PlatformDatagramChannel
/**
/**
...
@@ -38,7 +36,7 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
...
@@ -38,7 +36,7 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
val
socket
:
Socket
val
socket
:
Socket
val
bot
:
Bot
val
bot
:
Bot
val
supervisor
get
()
=
SupervisorJob
()
val
supervisor
:
CompletableJob
val
session
:
BotSession
val
session
:
BotSession
...
@@ -46,7 +44,7 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
...
@@ -46,7 +44,7 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
* 依次尝试登录到可用的服务器. 在任一服务器登录完成后返回登录结果
* 依次尝试登录到可用的服务器. 在任一服务器登录完成后返回登录结果
* 本函数将挂起直到登录成功.
* 本函数将挂起直到登录成功.
*/
*/
suspend
fun
login
(
configuration
:
BotConfiguration
):
LoginResult
suspend
fun
login
():
LoginResult
/**
/**
* 添加一个临时包处理器, 并发送相应的包
* 添加一个临时包处理器, 并发送相应的包
...
@@ -70,6 +68,6 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
...
@@ -70,6 +68,6 @@ interface BotNetworkHandler<Socket : DataPacketSocketAdapter> : CoroutineScope {
* 关闭网络接口, 停止所有有关协程和任务
* 关闭网络接口, 停止所有有关协程和任务
*/
*/
suspend
fun
close
(
cause
:
Throwable
?
=
null
)
{
suspend
fun
close
(
cause
:
Throwable
?
=
null
)
{
supervisor
.
cancel
Children
(
CancellationException
(
"handler closed"
,
cause
))
supervisor
.
cancel
(
CancellationException
(
"handler closed"
,
cause
))
}
}
}
}
\ No newline at end of file
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/TIMBotNetworkHandler.kt
View file @
a0098966
This diff is collapsed.
Click to expand it.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/login/LoginResult.kt
View file @
a0098966
...
@@ -123,6 +123,13 @@ fun LoginResult.requireSuccess() = requireSuccess { "Login failed: $this" }
...
@@ -123,6 +123,13 @@ fun LoginResult.requireSuccess() = requireSuccess { "Login failed: $this" }
*/
*/
fun
LoginResult
.
requireSuccessOrNull
():
Unit
?
=
if
(
this
==
SUCCESS
)
Unit
else
null
fun
LoginResult
.
requireSuccessOrNull
():
Unit
?
=
if
(
this
==
SUCCESS
)
Unit
else
null
/**
* 返回 [this] 是否为 [LoginResult.SUCCESS].
*/
@Suppress
(
"NOTHING_TO_INLINE"
)
@UseExperimental
(
ExperimentalContracts
::
class
)
inline
fun
LoginResult
.
isSuccess
():
Boolean
=
this
==
SUCCESS
/**
/**
* 检查 [this] 为 [LoginResult.SUCCESS].
* 检查 [this] 为 [LoginResult.SUCCESS].
* 失败则返回 `null`
* 失败则返回 `null`
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/BotConfiguration.kt
View file @
a0098966
...
@@ -5,6 +5,8 @@ import com.soywiz.klock.seconds
...
@@ -5,6 +5,8 @@ import com.soywiz.klock.seconds
import
kotlinx.io.core.IoBuffer
import
kotlinx.io.core.IoBuffer
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.network.protocol.tim.packet.login.TouchPacket.TouchResponse
import
net.mamoe.mirai.network.protocol.tim.packet.login.TouchPacket.TouchResponse
import
kotlin.coroutines.CoroutineContext
import
kotlin.coroutines.coroutineContext
import
kotlin.jvm.JvmField
import
kotlin.jvm.JvmField
/**
/**
...
@@ -22,7 +24,7 @@ expect var DefaultCaptchaSolver: CaptchaSolver
...
@@ -22,7 +24,7 @@ expect var DefaultCaptchaSolver: CaptchaSolver
/**
/**
* 网络和连接配置
* 网络和连接配置
*/
*/
class
BotConfiguration
{
class
BotConfiguration
:
CoroutineContext
.
Element
{
/**
/**
* 等待 [TouchResponse] 的时间
* 等待 [TouchResponse] 的时间
*/
*/
...
@@ -42,6 +44,18 @@ class BotConfiguration {
...
@@ -42,6 +44,18 @@ class BotConfiguration {
* 一旦心跳超时, 整个网络服务将会重启 (将消耗约 1s). 除正在进行的任务 (如图片上传) 会被中断外, 事件和插件均不受影响.
* 一旦心跳超时, 整个网络服务将会重启 (将消耗约 1s). 除正在进行的任务 (如图片上传) 会被中断外, 事件和插件均不受影响.
*/
*/
var
heartbeatTimeout
:
TimeSpan
=
2
.
seconds
var
heartbeatTimeout
:
TimeSpan
=
2
.
seconds
/**
* 心跳失败后的第一次重连前的等待时间.
*/
var
firstReconnectDelay
:
TimeSpan
=
5
.
seconds
/**
* 重连失败后, 继续尝试的每次等待时间
*/
var
reconnectPeriod
:
TimeSpan
=
60
.
seconds
/**
* 最多尝试多少次重连
*/
var
reconnectionRetryTimes
:
Int
=
3
/**
/**
* 有验证码要求就失败
* 有验证码要求就失败
*/
*/
...
@@ -51,11 +65,15 @@ class BotConfiguration {
...
@@ -51,11 +65,15 @@ class BotConfiguration {
*/
*/
var
captchaSolver
:
CaptchaSolver
=
DefaultCaptchaSolver
var
captchaSolver
:
CaptchaSolver
=
DefaultCaptchaSolver
companion
object
{
companion
object
Key
:
CoroutineContext
.
Key
<
BotConfiguration
>
{
/**
/**
* 默认的配置实例
* 默认的配置实例
*/
*/
@JvmField
@JvmField
val
Default
=
BotConfiguration
()
val
Default
=
BotConfiguration
()
}
}
}
\ No newline at end of file
override
val
key
:
CoroutineContext
.
Key
<
*
>
get
()
=
Key
}
suspend
inline
fun
currentBotConfiguration
():
BotConfiguration
=
coroutineContext
[
BotConfiguration
]
?:
error
(
"No BotConfiguration found"
)
\ No newline at end of file
mirai-debug/src/main/kotlin/PacketDebuger.kt
View file @
a0098966
...
@@ -17,7 +17,6 @@ import net.mamoe.mirai.network.protocol.tim.packet.login.CaptchaKey
...
@@ -17,7 +17,6 @@ import net.mamoe.mirai.network.protocol.tim.packet.login.CaptchaKey
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.LoginResult
import
net.mamoe.mirai.network.protocol.tim.packet.login.ShareKey
import
net.mamoe.mirai.network.protocol.tim.packet.login.ShareKey
import
net.mamoe.mirai.network.protocol.tim.packet.login.TouchKey
import
net.mamoe.mirai.network.protocol.tim.packet.login.TouchKey
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.DecryptionFailedException
import
net.mamoe.mirai.utils.DecryptionFailedException
import
net.mamoe.mirai.utils.decryptBy
import
net.mamoe.mirai.utils.decryptBy
import
net.mamoe.mirai.utils.io.*
import
net.mamoe.mirai.utils.io.*
...
@@ -301,6 +300,7 @@ when (idHex.substring(0, 5)) {
...
@@ -301,6 +300,7 @@ when (idHex.substring(0, 5)) {
internal
object
DebugNetworkHandler
:
BotNetworkHandler
<
DataPacketSocketAdapter
>,
CoroutineScope
{
internal
object
DebugNetworkHandler
:
BotNetworkHandler
<
DataPacketSocketAdapter
>,
CoroutineScope
{
override
val
supervisor
:
CompletableJob
=
SupervisorJob
()
override
val
socket
:
DataPacketSocketAdapter
=
object
:
DataPacketSocketAdapter
{
override
val
socket
:
DataPacketSocketAdapter
=
object
:
DataPacketSocketAdapter
{
override
val
serverIp
:
String
override
val
serverIp
:
String
get
()
=
""
get
()
=
""
...
@@ -320,10 +320,10 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
...
@@ -320,10 +320,10 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
get
()
=
bot
get
()
=
bot
}
}
override
val
bot
:
Bot
=
Bot
(
qq
,
""
)
override
val
bot
:
Bot
=
Bot
(
qq
,
""
,
coroutineContext
)
override
val
session
=
BotSession
(
bot
,
sessionKey
,
socket
,
this
)
override
val
session
=
BotSession
(
bot
,
sessionKey
,
socket
,
this
)
override
suspend
fun
login
(
configuration
:
BotConfiguration
):
LoginResult
=
LoginResult
.
SUCCESS
override
suspend
fun
login
():
LoginResult
=
LoginResult
.
SUCCESS
override
suspend
fun
addHandler
(
temporaryPacketHandler
:
TemporaryPacketHandler
<
*
,
*
>)
{
override
suspend
fun
addHandler
(
temporaryPacketHandler
:
TemporaryPacketHandler
<
*
,
*
>)
{
}
}
...
@@ -336,4 +336,5 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
...
@@ -336,4 +336,5 @@ internal object DebugNetworkHandler : BotNetworkHandler<DataPacketSocketAdapter>
override
val
coroutineContext
:
CoroutineContext
override
val
coroutineContext
:
CoroutineContext
get
()
=
GlobalScope
.
coroutineContext
get
()
=
GlobalScope
.
coroutineContext
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment