//如果不支持ssl,请注释这一条
Connector.setDefaultSSL(SSLFactory.genSSLSocket(), SSLFactory.trustManager)
client = LemonClient(host, port, object : SocketListener {
override fun onReConnect() {
Toaster.showInfo("socket.onReConnect")
}
override fun onConnected() {
Toaster.showInfo("socket.onConnected")
}
override fun onError(socketIOException: SocketIOException) {
Toaster.showInfo("socket.onError")
}
override fun onDisconnect() {
Toaster.showInfo("socket.onDisconnect")
}
//如果不需要内部的重连机制 reconnectTime = -1
},reconnectTime = 3000)
-
Notifications
You must be signed in to change notification settings - Fork 3
vecharm/Lemon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
重构Pomelo,将Java-websocket 替换为 okhttp-websocket
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published