我想发送byte []进行请求,并且在响应中我将获得byte []。因此,请您帮我一下。
现在,我正在使用Asynctask doInBackground()进行网络调用和Socket类。
已经通过一些链接,但找不到解决方案。
提前致谢。
最佳答案
似乎Volley是一个http库,请参阅this。为此使用AsyncTask
就足够了。
编辑
Kryonet is another very good Java network library for sending TCP and UDP packets over network efficiently which runs on Android as well. Though whenever I used Kryonet, I wrote both the server side code and client side code using this library. Kryonet keeps the connection alive though, so if you don't have any issues changing your server side code from Python to Java (Kryonet has samples which you can use), then it will serve your purpose well. Using this library, you don't even need to hardcode any IP address. You can discover the local server in real time with just one line of code.
引用自here
关于android - 如何使用Volley库通过套接字(IP地址)和端口号(例如1234)进行网络调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39344438/