-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬,请问websocket无法连接是怎么回事呢? #9
Comments
客户端连这个地址:ws://${localIPAddress}:${port}/ws |
我的第一条评论的写法是服务端的写法,客户端是一个网页,那个ip和端口该怎么写呢 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
androidServer
.websocket("ws://${localIPAddress}:${port}/ws", object : SocketListener {
override fun onMessageResponseServer(msg: String, ChannelId: String) {
Log.e("WebSocketService", "msg = $msg")
}
我是这样写的,localIPAddress是用的你库里边的工具类,端口写的8080,然后AS查看日志,一直报disconnect client: /127.0.0.1:xxxx,
端口号一直在变化
The text was updated successfully, but these errors were encountered: