mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-13 03:16:05 +08:00
Make NetworkHandlerFactory
fun interface
This commit is contained in:
parent
c6d9825cf6
commit
44bfe3dbb6
@ -17,7 +17,7 @@ import java.net.SocketAddress
|
|||||||
/**
|
/**
|
||||||
* Factory for a specific [NetworkHandler] implementation.
|
* Factory for a specific [NetworkHandler] implementation.
|
||||||
*/
|
*/
|
||||||
internal interface NetworkHandlerFactory<out H : NetworkHandler> {
|
internal fun interface NetworkHandlerFactory<out H : NetworkHandler> {
|
||||||
fun create(context: NetworkHandlerContext, host: String, port: Int): H =
|
fun create(context: NetworkHandlerContext, host: String, port: Int): H =
|
||||||
create(context, InetSocketAddress.createUnresolved(host, port))
|
create(context, InetSocketAddress.createUnresolved(host, port))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user