AndroidSocketClient icon indicating copy to clipboard operation
AndroidSocketClient copied to clipboard

给单片机用sendString发送消息,发送监听未监听到任何消息,程序崩溃

Open ghost opened this issue 8 years ago • 5 comments

FATAL EXCEPTION: Thread-22025 Process: com.zcyke.test, PID: 24508 java.lang.IllegalArgumentException: we need string charset to send string type message at com.vilyever.socketclient.SocketClient$SendThread.run(SocketClient.java:1090)

ghost avatar Sep 21 '16 02:09 ghost

自行查看首页readme中 默认String编码配置

vilyever avatar Sep 21 '16 03:09 vilyever

这个是有设置的

ghost avatar Sep 21 '16 04:09 ghost

必须在connect前设置,还是有问题的话可以放一下相关设置代码

vilyever avatar Sep 21 '16 04:09 vilyever

@ping999 可以了解下Socket的使用,建立Socket对象,配置参数,然后connect.

jp1017 avatar Sep 21 '16 07:09 jp1017

我这边需要一个与后台服务端的长连接, 这个库有人这么用过没?

pengdun avatar Sep 30 '16 10:09 pengdun